0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/client/app/components/gh-alerts.js

18 lines
419 B
JavaScript
Raw Normal View History

2015-05-21 11:03:24 -06:00
import Ember from 'ember';
const {Component, computed, inject, observer} = Ember;
const {alias} = computed;
export default Component.extend({
2015-05-21 11:03:24 -06:00
tagName: 'aside',
classNames: 'gh-alerts',
notifications: inject.service(),
2015-05-21 11:03:24 -06:00
messages: alias('notifications.alerts'),
2015-05-21 11:03:24 -06:00
messageCountObserver: observer('messages.[]', function () {
2015-05-21 11:03:24 -06:00
this.sendAction('notify', this.get('messages').length);
})
});