2014-12-01 11:39:11 +00:00
|
|
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
|
|
|
|
2015-05-25 13:17:10 -05:00
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
|
|
titleToken: 'Settings - Labs',
|
2014-12-01 11:39:11 +00:00
|
|
|
|
|
|
|
classNames: ['settings'],
|
2015-05-25 13:17:10 -05:00
|
|
|
|
2015-06-17 00:24:01 +01:00
|
|
|
beforeModel: function (transition) {
|
|
|
|
this._super(transition);
|
2015-04-14 16:04:16 +01:00
|
|
|
return this.get('session.user')
|
2014-12-01 11:39:11 +00:00
|
|
|
.then(this.transitionAuthor())
|
|
|
|
.then(this.transitionEditor());
|
|
|
|
},
|
|
|
|
|
|
|
|
model: function () {
|
|
|
|
return this.store.find('setting', {type: 'blog,theme'}).then(function (records) {
|
|
|
|
return records.get('firstObject');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|