mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 00:11:49 +03:00
920e36f8e0
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
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;
|