mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 01:42:29 +03:00
35 lines
713 B
JavaScript
35 lines
713 B
JavaScript
import Ember from 'ember';
|
|
|
|
const {
|
|
Mixin,
|
|
computed,
|
|
inject: {controller}
|
|
} = Ember;
|
|
|
|
export default Mixin.create({
|
|
application: controller(),
|
|
|
|
isViewingSubview: computed('application.showSettingsMenu', {
|
|
get() {
|
|
return false;
|
|
},
|
|
set(key, value) {
|
|
// Not viewing a subview if we can't even see the PSM
|
|
if (!this.get('application.showSettingsMenu')) {
|
|
return false;
|
|
}
|
|
return value;
|
|
}
|
|
}),
|
|
|
|
actions: {
|
|
showSubview() {
|
|
this.set('isViewingSubview', true);
|
|
},
|
|
|
|
closeSubview() {
|
|
this.set('isViewingSubview', false);
|
|
}
|
|
}
|
|
});
|