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

54 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-02-12 23:22:32 -05:00
import Ember from 'ember';
2015-05-24 00:47:23 -05:00
2016-01-19 08:03:27 -05:00
const {
Controller,
computed,
inject: {service}
} = Ember;
export default Controller.extend({
2016-01-19 08:03:27 -05:00
dropdown: service(),
signedOut: computed.match('currentPath', /(signin|signup|setup|reset)/),
topNotificationCount: 0,
showMobileMenu: false,
showSettingsMenu: false,
showMarkdownHelpModal: false,
2015-05-24 00:47:23 -05:00
autoNav: false,
autoNavOpen: computed('autoNav', {
get() {
return false;
},
set(key, value) {
if (this.get('autoNav')) {
return value;
}
return false;
}
}),
actions: {
topNotificationChange(count) {
this.set('topNotificationCount', count);
2015-05-24 00:47:23 -05:00
},
toggleAutoNav() {
this.toggleProperty('autoNav');
},
openAutoNav() {
this.set('autoNavOpen', true);
2015-05-24 00:47:23 -05:00
},
closeAutoNav() {
this.set('autoNavOpen', false);
},
closeMobileMenu() {
this.set('showMobileMenu', false);
}
}
});