mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 22:02:11 +03:00
5e3de1c333
no issue - the autonav behaviour has outlasted it's usefulness - it was mostly useful for editing but the editor screen is now always fullscreen and the number of low-resolution screens has dropped significantly - dropped the components and all supporting code associated with autonav behaviour
54 lines
1.1 KiB
JavaScript
54 lines
1.1 KiB
JavaScript
import Service, {inject as service} from '@ember/service';
|
|
import {not, or, reads} from '@ember/object/computed';
|
|
|
|
export default Service.extend({
|
|
dropdown: service(),
|
|
mediaQueries: service(),
|
|
|
|
isFullScreen: false,
|
|
showMobileMenu: false,
|
|
showSettingsMenu: false,
|
|
|
|
hasSideNav: not('isSideNavHidden'),
|
|
isMobile: reads('mediaQueries.isMobile'),
|
|
isSideNavHidden: or('isFullScreen', 'isMobile'),
|
|
|
|
closeMenus() {
|
|
this.get('dropdown').closeDropdowns();
|
|
this.setProperties({
|
|
showSettingsMenu: false,
|
|
showMobileMenu: false
|
|
});
|
|
},
|
|
|
|
closeMobileMenu() {
|
|
this.set('showMobileMenu', false);
|
|
},
|
|
|
|
openMobileMenu() {
|
|
this.set('showMobileMenu', true);
|
|
},
|
|
|
|
openSettingsMenu() {
|
|
this.set('showSettingsMenu', true);
|
|
},
|
|
|
|
actions: {
|
|
closeMenus() {
|
|
this.closeMenus();
|
|
},
|
|
|
|
closeMobileMenu() {
|
|
this.closeMobileMenu();
|
|
},
|
|
|
|
openMobileMenu() {
|
|
this.openMobileMenu();
|
|
},
|
|
|
|
openSettingsMenu() {
|
|
this.openSettingsMenu();
|
|
}
|
|
}
|
|
});
|