mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
no issue - add ember-suave dependency - upgrade grunt-jscs dependency - add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc - separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc - standardize es6 usage across client
27 lines
807 B
JavaScript
27 lines
807 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(transition) {
|
|
this._super(transition);
|
|
return this.get('session.user')
|
|
.then(this.transitionAuthor())
|
|
.then(this.transitionEditor());
|
|
},
|
|
|
|
model() {
|
|
return this.store.query('setting', {type: 'blog,theme'}).then((records) => {
|
|
return records.get('firstObject');
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
save() {
|
|
this.get('controller').send('save');
|
|
}
|
|
}
|
|
});
|