2014-03-11 17:23:32 +01:00
|
|
|
var ApplicationController = Ember.Controller.extend({
|
2014-10-24 21:09:50 +00:00
|
|
|
// jscs: disable
|
2014-08-06 08:08:02 -07:00
|
|
|
hideNav: Ember.computed.match('currentPath', /(error|signin|signup|setup|forgotten|reset)/),
|
2014-10-24 21:09:50 +00:00
|
|
|
// jscs: enable
|
2014-05-14 18:36:13 -05:00
|
|
|
|
2014-07-17 17:28:53 +00:00
|
|
|
topNotificationCount: 0,
|
2014-09-01 17:45:06 +01:00
|
|
|
showGlobalMobileNav: false,
|
2014-10-13 16:23:06 +01:00
|
|
|
showSettingsMenu: false,
|
2014-07-17 17:28:53 +00:00
|
|
|
|
2015-01-28 16:30:03 +00:00
|
|
|
userImage: Ember.computed('session.user.image', function () {
|
|
|
|
return this.get('session.user.image') || this.get('ghostPaths.url').asset('/shared/img/user-image.png');
|
|
|
|
}),
|
|
|
|
|
|
|
|
userImageBackground: Ember.computed('userImage', function () {
|
|
|
|
return 'background-image: url(' + this.get('userImage') + ')';
|
|
|
|
}),
|
|
|
|
|
|
|
|
userImageAlt: Ember.computed('session.user.name', function () {
|
2014-10-21 16:02:11 +00:00
|
|
|
var name = this.get('session.user.name');
|
|
|
|
|
2015-01-28 16:30:03 +00:00
|
|
|
return (name) ? name + '\'s profile picture' : 'Profile picture';
|
2014-10-21 16:02:11 +00:00
|
|
|
}),
|
|
|
|
|
2014-04-06 18:11:22 -04:00
|
|
|
actions: {
|
2014-07-17 17:28:53 +00:00
|
|
|
topNotificationChange: function (count) {
|
|
|
|
this.set('topNotificationCount', count);
|
2014-04-06 18:11:22 -04:00
|
|
|
}
|
|
|
|
}
|
2014-03-11 17:23:32 +01:00
|
|
|
});
|
|
|
|
|
2014-07-17 17:28:53 +00:00
|
|
|
export default ApplicationController;
|