0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-13 22:41:32 -05:00
ghost/core/client/routes/settings/apps.js
Fabian Becker e886e90b9d Implements setting specific body classes
closes #4116
- Adds css classes to settings views
2014-09-24 15:24:15 +02:00

22 lines
640 B
JavaScript

import CurrentUserSettings from 'ghost/mixins/current-user-settings';
import styleBody from 'ghost/mixins/style-body';
var AppsRoute = Ember.Route.extend(SimpleAuth.AuthenticatedRouteMixin, styleBody, CurrentUserSettings, {
classNames: ['settings-view-apps'],
beforeModel: function () {
if (!this.get('config.apps')) {
return this.transitionTo('settings.general');
}
return this.currentUser()
.then(this.transitionAuthor())
.then(this.transitionEditor());
},
model: function () {
return this.store.find('app');
}
});
export default AppsRoute;