Ghost/core/client/app/controllers/application.js
Jason Williams 42166c8d9f 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

49 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);
}
}
});