-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5672 from hashicorp/ui-alerts-update
UI: Update banner and popup alerts
- Loading branch information
Showing
42 changed files
with
409 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Component from '@ember/component'; | ||
import { computed } from '@ember/object'; | ||
|
||
import { messageTypes } from 'vault/helpers/message-types'; | ||
|
||
export default Component.extend({ | ||
type: null, | ||
|
||
classNames: ['message-inline'], | ||
|
||
textClass: computed('type', function() { | ||
if (this.get('type') == 'danger') { | ||
return messageTypes([this.get('type')]).glyphClass; | ||
} | ||
|
||
return | ||
}), | ||
|
||
alertType: computed('type', function() { | ||
return messageTypes([this.get('type')]); | ||
}), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
.global-flash { | ||
position: fixed; | ||
max-width: 450px; | ||
width: 95%; | ||
bottom: 0; | ||
left: 0; | ||
left: $spacing-s; | ||
margin: 10px; | ||
max-width: $drawer-width; | ||
position: fixed; | ||
width: 95%; | ||
z-index: 300; | ||
|
||
.notification { | ||
.message { | ||
box-shadow: $box-shadow-high; | ||
margin: 20px; | ||
@include until($desktop) { | ||
margin: 1rem 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.login-form { | ||
box-shadow: $box-shadow, $box-shadow-high; | ||
overflow: auto; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
.unseal-warning.message, | ||
.unseal-warning .message-body { | ||
border-radius: 0; | ||
margin-bottom: 0; | ||
.unseal-warning.message { | ||
margin: -1px -1px 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,113 @@ | ||
.message { | ||
&.is-list { | ||
margin: $size-10 0; | ||
background: $blue-010; | ||
border: 1px solid $blue-100; | ||
margin-bottom: $spacing-s; | ||
padding: $spacing-s $spacing-m $spacing-m $spacing-s; | ||
position: relative; | ||
|
||
.message-icon { | ||
color: $blue; | ||
margin-right: $spacing-xs; | ||
} | ||
|
||
.close-button { | ||
background: transparent; | ||
border: 0; | ||
color: $grey; | ||
cursor: pointer; | ||
position: absolute; | ||
right: $spacing-s; | ||
top: $spacing-m; | ||
} | ||
|
||
.message-title { | ||
color: $blue-500; | ||
font-size: 16px; | ||
font-weight: $font-weight-bold; | ||
line-height: 1.25; | ||
} | ||
|
||
.close-button + .message-title { | ||
padding-right: $spacing-m; | ||
} | ||
|
||
&.is-warning { | ||
.message-body { | ||
color: $yellow-darkest; | ||
padding: 0.75rem 1.25rem; | ||
.message-body { | ||
border: 0; | ||
margin-top: $spacing-xxs; | ||
} | ||
|
||
p { | ||
font-size: $size-8; | ||
border: 0; | ||
padding: 0; | ||
} | ||
|
||
.message-actions { | ||
margin-top: $spacing-xs; | ||
|
||
a, | ||
a:not(.button):not(.file-delete-button):not(.tag) { | ||
color: $blue; | ||
font-weight: $font-weight-semibold; | ||
text-decoration: none; | ||
} | ||
|
||
> * + * { | ||
margin-left: $spacing-xs; | ||
} | ||
} | ||
|
||
&.is-highlight { | ||
background: $yellow-lightest; | ||
.message-body { | ||
border: none; | ||
box-shadow: 0 0 0 1px $yellow; | ||
color: $yellow-darkest; | ||
background: $yellow-010; | ||
border: 1px solid $yellow-100; | ||
|
||
.message-icon { | ||
color: $yellow-500; | ||
} | ||
.has-text-highlight, | ||
.close-button { | ||
color: $yellow; | ||
|
||
.message-title { | ||
color: $orange-700; | ||
} | ||
.title, | ||
code { | ||
background: none; | ||
color: inherit; | ||
} | ||
|
||
&.is-success { | ||
background: $green-010; | ||
border: 1px solid $green-100; | ||
|
||
.message-icon { | ||
color: $green-500; | ||
} | ||
.content .button { | ||
border-color: $yellow; | ||
color: $yellow-darkest; | ||
|
||
.message-title { | ||
color: $green-700; | ||
} | ||
} | ||
|
||
.content { | ||
margin-bottom: 0; | ||
&.is-danger { | ||
background: $red-010; | ||
border: 1px solid $red-050; | ||
|
||
.message-icon { | ||
color: $red-500; | ||
} | ||
|
||
.message-title { | ||
color: $red-700; | ||
} | ||
} | ||
} | ||
|
||
.message-inline { | ||
display: flex; | ||
margin: -$spacing-xs 0 $spacing-l; | ||
|
||
.icon { | ||
flex: 0; | ||
margin: 0 $spacing-xxs 0 0; | ||
min-width: fit-content; | ||
} | ||
|
||
.p { | ||
margin: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div data-test-flash-message=true> | ||
<div class="columns is-mobile is-variable is-1"> | ||
<div class="column is-narrow message-icon"> | ||
<ICon | ||
@glyph="{{alertType.glyph}}" | ||
@class="{{alertType.glyphClass}}" | ||
@size="20" | ||
@excludeIconClass="true" | ||
/> | ||
</div> | ||
{{#if yieldWithoutColumn}} | ||
{{yield}} | ||
{{else}} | ||
<div class="column"> | ||
<div class="message-title"> | ||
{{or title alertType.text}} | ||
</div> | ||
{{#if message}} | ||
<p class="message-body"> | ||
{{message}} | ||
</p> | ||
{{/if}} | ||
{{#if hasBlock}} | ||
<p class="message-actions"> | ||
{{yield}} | ||
</p> | ||
{{/if}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<ICon | ||
@glyph="{{alertType.glyph}}" | ||
@class="{{alertType.glyphClass}}" | ||
@size="16" | ||
/> | ||
<p class="{{textClass}}"> | ||
{{message}} | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.