Ghost/ghost/admin/routes/settings/labs.js
cobbspur 920e36f8e0 Move ugly debug to Settings Labs
closes #4534

- Adds new Labs route
- Wires route in settings page
- Move and rename debug templates and logic to labs
- Redirect /debug to settings/labs
2014-12-01 19:19:08 +00:00

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;