Ghost/ghost/admin/app/components/gh-alerts.js
Kevin Ansfield ee89b11a6a Refactor notifications service & components
issue #5409

- change persistent/passive notification status to alert/notification
- replace showSuccess/Info/Warn/Error with showNotification/showAlert
- fix and clean up notification/alert components
2015-07-28 12:26:11 +01:00

15 lines
370 B
JavaScript

import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'aside',
classNames: 'gh-alerts',
notifications: Ember.inject.service(),
messages: Ember.computed.alias('notifications.alerts'),
messageCountObserver: Ember.observer('messages.[]', function () {
this.sendAction('notify', this.get('messages').length);
})
});