2015-02-12 23:22:32 -05:00
|
|
|
import Ember from 'ember';
|
2015-05-24 00:47:23 -05:00
|
|
|
|
2016-01-19 08:03:27 -05:00
|
|
|
const {
|
|
|
|
Controller,
|
|
|
|
computed,
|
|
|
|
inject: {service}
|
|
|
|
} = Ember;
|
2015-05-25 21:10:50 -05:00
|
|
|
|
2015-10-28 06:36:45 -05:00
|
|
|
export default Controller.extend({
|
2016-01-19 08:03:27 -05:00
|
|
|
dropdown: service(),
|
2015-10-28 06:36:45 -05:00
|
|
|
|
|
|
|
signedOut: computed.match('currentPath', /(signin|signup|setup|reset)/),
|
2014-05-14 18:36:13 -05:00
|
|
|
|
2014-07-17 12:28:53 -05:00
|
|
|
topNotificationCount: 0,
|
2015-05-27 09:39:56 -05:00
|
|
|
showMobileMenu: false,
|
2014-10-13 10:23:06 -05:00
|
|
|
showSettingsMenu: false,
|
2015-11-18 05:50:48 -05:00
|
|
|
showMarkdownHelpModal: false,
|
2014-07-17 12:28:53 -05:00
|
|
|
|
2015-05-24 00:47:23 -05:00
|
|
|
autoNav: false,
|
2015-10-28 06:36:45 -05:00
|
|
|
autoNavOpen: computed('autoNav', {
|
|
|
|
get() {
|
2015-05-27 09:39:56 -05:00
|
|
|
return false;
|
|
|
|
},
|
2015-10-28 06:36:45 -05:00
|
|
|
set(key, value) {
|
2015-05-27 09:39:56 -05:00
|
|
|
if (this.get('autoNav')) {
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}),
|
2014-10-21 11:02:11 -05:00
|
|
|
|
2014-04-06 17:11:22 -05:00
|
|
|
actions: {
|
2015-10-28 06:36:45 -05:00
|
|
|
topNotificationChange(count) {
|
2014-07-17 12:28:53 -05:00
|
|
|
this.set('topNotificationCount', count);
|
2015-05-24 00:47:23 -05:00
|
|
|
},
|
|
|
|
|
2015-10-28 06:36:45 -05:00
|
|
|
toggleAutoNav() {
|
2015-05-27 09:39:56 -05:00
|
|
|
this.toggleProperty('autoNav');
|
|
|
|
},
|
|
|
|
|
2015-10-28 06:36:45 -05:00
|
|
|
openAutoNav() {
|
2015-05-27 09:39:56 -05:00
|
|
|
this.set('autoNavOpen', true);
|
2015-05-24 00:47:23 -05:00
|
|
|
},
|
|
|
|
|
2015-10-28 06:36:45 -05:00
|
|
|
closeAutoNav() {
|
2015-05-27 09:39:56 -05:00
|
|
|
this.set('autoNavOpen', false);
|
2015-06-09 11:25:45 -05:00
|
|
|
},
|
|
|
|
|
2015-10-28 06:36:45 -05:00
|
|
|
closeMobileMenu() {
|
2015-06-09 11:25:45 -05:00
|
|
|
this.set('showMobileMenu', false);
|
2014-04-06 17:11:22 -05:00
|
|
|
}
|
|
|
|
}
|
2014-03-11 11:23:32 -05:00
|
|
|
});
|