1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/mixins/settings-menu-component.js
Austin Burdine 525e6c85d0 🎨 convert post-settings-menu into a component (#137)
no issue
- cleans up some of the render code
- aligns things with the "ember way"
- move metaTitleScratch and metaDescriptionScratch bindings to post model
2017-03-10 14:30:01 +00:00

29 lines
668 B
JavaScript

import Mixin from 'ember-metal/mixin';
import computed from 'ember-computed';
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);
}
}
});