2017-08-22 10:53:26 +03:00
|
|
|
import Mixin from '@ember/object/mixin';
|
|
|
|
import {computed} from '@ember/object';
|
2015-05-26 05:10:50 +03:00
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
export default Mixin.create({
|
2017-03-10 17:30:01 +03:00
|
|
|
showSettingsMenu: false,
|
2015-10-28 14:36:45 +03:00
|
|
|
|
2017-03-10 17:30:01 +03:00
|
|
|
isViewingSubview: computed('showSettingsMenu', {
|
2015-10-28 14:36:45 +03:00
|
|
|
get() {
|
2014-12-14 06:09:19 +03:00
|
|
|
return false;
|
2015-06-03 05:56:42 +03:00
|
|
|
},
|
2015-10-28 14:36:45 +03:00
|
|
|
set(key, value) {
|
2015-06-03 05:56:42 +03:00
|
|
|
// Not viewing a subview if we can't even see the PSM
|
2019-03-06 16:53:54 +03:00
|
|
|
if (!this.showSettingsMenu) {
|
2015-06-03 05:56:42 +03:00
|
|
|
return false;
|
|
|
|
}
|
2014-12-14 06:09:19 +03:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
|
|
|
|
actions: {
|
2015-10-28 14:36:45 +03:00
|
|
|
showSubview() {
|
2014-12-14 06:09:19 +03:00
|
|
|
this.set('isViewingSubview', true);
|
|
|
|
},
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
closeSubview() {
|
2014-12-14 06:09:19 +03:00
|
|
|
this.set('isViewingSubview', false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|