Ghost/core/client/app/mixins/settings-menu-controller.js
Austin Burdine 28d265c9c1 update Ember to 1.12.1/ember-data to 1.0.0-beta.18
No issue
- fixed "{{#each}}" helper in templates to use block syntax
- fixed deprecated ember.controller getter/setter function to use new syntax
- removed unnecessary pass-protect route view
2015-06-02 22:26:16 -06:00

29 lines
712 B
JavaScript

import Ember from 'ember';
export default Ember.Mixin.create({
application: Ember.inject.controller(),
isViewingSubview: Ember.computed('application.showSettingsMenu', {
get: function () {
return false;
},
set: function (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: function () {
this.set('isViewingSubview', true);
},
closeSubview: function () {
this.set('isViewingSubview', false);
}
}
});