0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/app/controllers/application.js

49 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-02-12 21:22:32 -07:00
import Ember from 'ember';
2015-05-24 00:47:23 -05:00
export default Ember.Controller.extend({
dropdown: Ember.inject.service(),
// jscs: disable
2015-05-21 22:47:51 -05:00
signedOut: Ember.computed.match('currentPath', /(signin|signup|setup|reset)/),
// jscs: enable
topNotificationCount: 0,
showMobileMenu: false,
showSettingsMenu: false,
2015-05-24 00:47:23 -05:00
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);
2015-05-24 00:47:23 -05:00
},
toggleAutoNav: function () {
this.toggleProperty('autoNav');
},
openAutoNav: function () {
this.set('autoNavOpen', true);
2015-05-24 00:47:23 -05:00
},
closeAutoNav: function () {
this.set('autoNavOpen', false);
},
closeMobileMenu: function () {
this.set('showMobileMenu', false);
}
}
});