mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
feac9682d0
- Refactor to handle deprecations including removal of all Views, ArrayControllers, and ItemControllers.
49 lines
1.1 KiB
JavaScript
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);
|
|
}
|
|
}
|
|
});
|