mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
6681ad4a7d
- [x] Mobilemenu button is missing from `content` and `editor` views - [x] Mobilemenu pane slides entire content over, should expand over-top-of-content - [x] Mobilemenu can't be closed - [x] gh-view-title no longer generates an extra div; it is the h2. - [x] gh-autonav-toggle closes the mobile menu on mobile. renamed `gh-menu-toggle` - [ ] There is weird behaviour with mobile menu when changing from big=>small=>big viewport sizes - ~~[ ] (Future issue) Ghost should remember (localstorage?) whether desktop menu is expanded or collapsed~~
49 lines
1.0 KiB
JavaScript
49 lines
1.0 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 () {
|
|
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);
|
|
},
|
|
|
|
closeMobileMenu () {
|
|
this.set('showMobileMenu', false);
|
|
}
|
|
}
|
|
});
|