mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
ab287848d4
no issue - cleans up some of the render code - aligns things with the "ember way" - move metaTitleScratch and metaDescriptionScratch bindings to post model
30 lines
668 B
JavaScript
30 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);
|
|
}
|
|
}
|
|
});
|