mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
c7a9e726e2
- Adds gh-view-title component to implement mobile menu button for titles on any page - Refactors the `content-cover` out into the application template - Fix various z-index issues with content-cover and gh-alert - Move `.settings-menu-expanded` application view state from body to `.gh-viewport` - Unify nav menu / mobile menu actions and code
44 lines
966 B
JavaScript
44 lines
966 B
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 () {
|
|
return false;
|
|
},
|
|
set (key, value) {
|
|
if (this.get('autoNav')) {
|
|
return value;
|
|
}
|
|
return false;
|
|
}
|
|
}),
|
|
|
|
actions: {
|
|
topNotificationChange (count) {
|
|
this.set('topNotificationCount', count);
|
|
},
|
|
|
|
toggleAutoNav () {
|
|
this.toggleProperty('autoNav');
|
|
},
|
|
|
|
openAutoNav () {
|
|
this.set('autoNavOpen', true);
|
|
},
|
|
|
|
closeAutoNav () {
|
|
this.set('autoNavOpen', false);
|
|
}
|
|
}
|
|
});
|