mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
24 lines
764 B
JavaScript
24 lines
764 B
JavaScript
|
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
||
|
import styleBody from 'ghost/mixins/style-body';
|
||
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
||
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||
|
|
||
|
var LabsRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, CurrentUserSettings, {
|
||
|
titleToken: 'Labs',
|
||
|
|
||
|
classNames: ['settings'],
|
||
|
beforeModel: function () {
|
||
|
return this.currentUser()
|
||
|
.then(this.transitionAuthor())
|
||
|
.then(this.transitionEditor());
|
||
|
},
|
||
|
|
||
|
model: function () {
|
||
|
return this.store.find('setting', {type: 'blog,theme'}).then(function (records) {
|
||
|
return records.get('firstObject');
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default LabsRoute;
|