- Your auth token expired at {{moment-format auth.tokenExpirationDate 'YYYY-MM-DD HH:mm:ss'}}. + Your auth token expired on {{moment-format auth.tokenExpirationDate 'MMMM Do YYYY, h:mm:ss a'}}. You will need to re-authenticate.
diff --git a/ui/app/components/token-expire-warning.js b/ui/app/components/token-expire-warning.js index d17911572aaf..dcd4c88f0da4 100644 --- a/ui/app/components/token-expire-warning.js +++ b/ui/app/components/token-expire-warning.js @@ -1,6 +1,7 @@ import Ember from 'ember'; export default Ember.Component.extend({ + classNames: 'token-expire-warning', auth: Ember.inject.service(), routing: Ember.inject.service('-routing'), diff --git a/ui/app/styles/components/token-expire-warning.scss b/ui/app/styles/components/token-expire-warning.scss new file mode 100644 index 000000000000..d761b9f70f6c --- /dev/null +++ b/ui/app/styles/components/token-expire-warning.scss @@ -0,0 +1,19 @@ +.token-expire-warning { + position: absolute; + z-index: 200; + display: flex; + justify-content: center; + box-shadow: $box-shadow-highest; + top: 1rem; + left: 1rem; + right: 1rem; +} +.token-expire-warning .content p { + padding-right: $size-6; +} +.token-expire-warning .message-in-page { + margin: 0; +} +.token-expire-warning .message { + width: 100%; +} diff --git a/ui/app/styles/core.scss b/ui/app/styles/core.scss index 0b19ace12848..5ca445492831 100644 --- a/ui/app/styles/core.scss +++ b/ui/app/styles/core.scss @@ -65,6 +65,7 @@ @import "./components/sidebar"; @import "./components/status-menu"; @import "./components/sub-nav"; +@import "./components/token-expire-warning"; @import "./components/tool-tip"; @import "./components/upgrade-overlay"; @import "./components/vault-loading"; diff --git a/ui/app/templates/components/identity/item-aliases.hbs b/ui/app/templates/components/identity/item-aliases.hbs index c2aa2c68d9f4..1ebafafbbaa4 100644 --- a/ui/app/templates/components/identity/item-aliases.hbs +++ b/ui/app/templates/components/identity/item-aliases.hbs @@ -17,7 +17,7 @@
- Your auth token expired at {{moment-format auth.tokenExpirationDate 'YYYY-MM-DD HH:mm:ss'}}. + Your auth token expired on {{moment-format auth.tokenExpirationDate 'MMMM Do YYYY, h:mm:ss a'}}. You will need to re-authenticate.