Ghost/ghost/admin/app/components/gh-alerts.js

18 lines
493 B
JavaScript
Raw Normal View History

import Component from '@ember/component';
import {alias} from '@ember/object/computed';
import {inject as injectService} from '@ember/service';
import {observer} from '@ember/object';
export default Component.extend({
2015-05-21 20:03:24 +03:00
tagName: 'aside',
classNames: 'gh-alerts',
notifications: injectService(),
2015-05-21 20:03:24 +03:00
messages: alias('notifications.alerts'),
2015-05-21 20:03:24 +03:00
messageCountObserver: observer('messages.[]', function () {
2015-05-21 20:03:24 +03:00
this.sendAction('notify', this.get('messages').length);
})
});