open-vault/ui/app/components/edition-badge.js

18 lines
459 B
JavaScript
Raw Normal View History

2018-04-03 14:16:57 +00:00
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'span',
2018-08-15 19:41:43 +00:00
classNames: 'tag is-outlined edition-badge',
attributeBindings: ['edition:aria-label'],
icon: Ember.computed('edition', function() {
2018-04-03 14:16:57 +00:00
const edition = this.get('edition');
2018-08-15 19:41:43 +00:00
const entEditions = ['Enterprise', 'Premium', 'Pro'];
2018-08-16 16:42:11 +00:00
if (entEditions.includes(edition)) {
2018-08-15 19:41:43 +00:00
return 'edition-enterprise';
2018-04-03 14:16:57 +00:00
} else {
2018-08-15 19:41:43 +00:00
return 'edition-oss';
2018-04-03 14:16:57 +00:00
}
}),
});