vault/ui/app/components/alert-inline.js
Matthew Irish be33d6580b
UI - new token renew banner (#5662)
* move warning banner out of token-expire-warning and into user menu
* check renewal status every 5s, and resume auto-renew if a user becomes active again
* use a link in the token-expire-warning
* add test for new expiration functionality
* fix license test
* use features helper in license test
* fix import
* use yarn 1.12.1
* remove mirage
* skip some tests for now
* use eslintignore
* logout after auth tests
* use new alert-banner for auth info warning
* add data-test selector back
* move identity back to a button, and style button.link
* make the warning message the right color
* fix shamir test
* review feedback
2018-11-05 10:56:59 -06:00

23 lines
495 B
JavaScript

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')]);
}),
});