mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
5018f2fb9e
No Issue - Switch resources to routes. - No longer nest "settings" routes so the router reflects the way the templates are rendered. - Remove renderTemplate override from settings routes. - Remove unneeded routes, controllers, and views. - Adjust users page so that infinite scroll loading of users works and markup remains the same for Zelda styling.
27 lines
802 B
JavaScript
27 lines
802 B
JavaScript
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
titleToken: 'Settings - Code Injection',
|
|
classNames: ['settings-view-code'],
|
|
|
|
beforeModel: function () {
|
|
return this.get('session.user')
|
|
.then(this.transitionAuthor())
|
|
.then(this.transitionEditor());
|
|
},
|
|
|
|
model: function () {
|
|
return this.store.find('setting', {type: 'blog,theme'}).then(function (records) {
|
|
return records.get('firstObject');
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
save: function () {
|
|
this.get('controller').send('save');
|
|
}
|
|
}
|
|
});
|