mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 15:12:58 +03:00
e74e2e039e
no issue - switch `jscs` and `jshint` inline config to `eslint` config - fix eslint errors, predominantly in tests where the config now the main app config more closely
54 lines
1.3 KiB
JavaScript
54 lines
1.3 KiB
JavaScript
import Controller from 'ember-controller';
|
|
import computed from 'ember-computed';
|
|
import injectService from 'ember-service/inject';
|
|
|
|
export default Controller.extend({
|
|
dropdown: injectService(),
|
|
session: injectService(),
|
|
|
|
showNavMenu: computed('currentPath', 'session.isAuthenticated', function () {
|
|
return (this.get('currentPath') !== 'error404' || this.get('session.isAuthenticated'))
|
|
&& !this.get('currentPath').match(/(signin|signup|setup|reset)/);
|
|
}),
|
|
|
|
topNotificationCount: 0,
|
|
showMobileMenu: false,
|
|
showSettingsMenu: false,
|
|
showMarkdownHelpModal: false,
|
|
|
|
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);
|
|
},
|
|
|
|
toggleAutoNav() {
|
|
this.toggleProperty('autoNav');
|
|
},
|
|
|
|
openAutoNav() {
|
|
this.set('autoNavOpen', true);
|
|
},
|
|
|
|
closeAutoNav() {
|
|
this.set('autoNavOpen', false);
|
|
},
|
|
|
|
closeMobileMenu() {
|
|
this.set('showMobileMenu', false);
|
|
}
|
|
}
|
|
});
|