Ghost/ghost/admin/app/mixins/settings-menu-component.js
Kevin Ansfield 983110d931 Switched from ember-cli-shims to new module imports (#779)
no issue

- add eslint-plugin-ember, configure no-old-shims rule
- run `eslint --fix` on `app`, `lib`, `mirage`, and `tests` to move imports to the new module imports
- further cleanup of Ember globals usage
- remove event-dispatcher initializer now that `canDispatchToEventManager` is deprecated
2017-08-22 14:53:26 +07:00

30 lines
671 B
JavaScript

import Mixin from '@ember/object/mixin';
import {computed} from '@ember/object';
export default Mixin.create({
showSettingsMenu: false,
isViewingSubview: computed('showSettingsMenu', {
get() {
return false;
},
set(key, value) {
// Not viewing a subview if we can't even see the PSM
if (!this.get('showSettingsMenu')) {
return false;
}
return value;
}
}),
actions: {
showSubview() {
this.set('isViewingSubview', true);
},
closeSubview() {
this.set('isViewingSubview', false);
}
}
});