mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
fb239054a0
follow up from #95 - converts components to use ember-cli-shims
18 lines
483 B
JavaScript
18 lines
483 B
JavaScript
import Component from 'ember-component';
|
|
import {alias} from 'ember-computed';
|
|
import injectService from 'ember-service/inject';
|
|
import observer from 'ember-metal/observer';
|
|
|
|
export default Component.extend({
|
|
tagName: 'aside',
|
|
classNames: 'gh-alerts',
|
|
|
|
notifications: injectService(),
|
|
|
|
messages: alias('notifications.alerts'),
|
|
|
|
messageCountObserver: observer('messages.[]', function () {
|
|
this.sendAction('notify', this.get('messages').length);
|
|
})
|
|
});
|