mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
0b1497a75b
closes #1993 - remove the feature/config flag that means code injection has to be enabled
29 lines
894 B
JavaScript
29 lines
894 B
JavaScript
import AuthenticatedRoute from 'ghost/routes/authenticated';
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
|
import CurrentUserSettings from 'ghost/mixins/current-user-settings';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
var SettingsCodeInjectionRoute = AuthenticatedRoute.extend(styleBody, loadingIndicator, CurrentUserSettings, {
|
|
classNames: ['settings-view-code'],
|
|
|
|
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');
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
save: function () {
|
|
this.get('controller').send('save');
|
|
}
|
|
}
|
|
});
|
|
|
|
export default SettingsCodeInjectionRoute;
|