1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/application.js
Jason Williams 89102fdd6c Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00

48 lines
1.1 KiB
JavaScript

import Ember from 'ember';
export default Ember.Controller.extend({
dropdown: Ember.inject.service(),
// jscs: disable
signedOut: Ember.computed.match('currentPath', /(signin|signup|setup|reset)/),
// jscs: enable
topNotificationCount: 0,
showMobileMenu: false,
showSettingsMenu: false,
autoNav: false,
autoNavOpen: Ember.computed('autoNav', {
get: function () {
return false;
},
set: function (key, value) {
if (this.get('autoNav')) {
return value;
}
return false;
}
}),
actions: {
topNotificationChange: function (count) {
this.set('topNotificationCount', count);
},
toggleAutoNav: function () {
this.toggleProperty('autoNav');
},
openAutoNav: function () {
this.set('autoNavOpen', true);
},
closeAutoNav: function () {
this.set('autoNavOpen', false);
},
closeMobileMenu: function () {
this.set('showMobileMenu', false);
}
}
});