2014-12-01 14:39:11 +03: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 21:17:10 +03:00
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
|
|
titleToken: 'Settings - Labs',
|
2014-12-01 14:39:11 +03:00
|
|
|
|
|
|
|
classNames: ['settings'],
|
2015-05-25 21:17:10 +03:00
|
|
|
|
2015-06-17 02:24:01 +03:00
|
|
|
beforeModel: function (transition) {
|
|
|
|
this._super(transition);
|
2015-04-14 18:04:16 +03:00
|
|
|
return this.get('session.user')
|
2014-12-01 14:39:11 +03:00
|
|
|
.then(this.transitionAuthor())
|
|
|
|
.then(this.transitionEditor());
|
|
|
|
},
|
|
|
|
|
|
|
|
model: function () {
|
2015-09-03 14:06:50 +03:00
|
|
|
return this.store.query('setting', {type: 'blog,theme'}).then(function (records) {
|
2014-12-01 14:39:11 +03:00
|
|
|
return records.get('firstObject');
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|