Ghost/core/client/app/routes/settings/labs.js

23 lines
717 B
JavaScript
Raw Normal View History

import AuthenticatedRoute from 'ghost/routes/authenticated';
import styleBody from 'ghost/mixins/style-body';
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
titleToken: 'Settings - Labs',
classNames: ['settings'],
beforeModel: function (transition) {
this._super(transition);
return this.get('session.user')
.then(this.transitionAuthor())
.then(this.transitionEditor());
},
model: function () {
return this.store.query('setting', {type: 'blog,theme'}).then(function (records) {
return records.get('firstObject');
});
}
});