mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
604fda4348
no issue - updates `package.json` details to better reflect the separation from the `Ghost` package - update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
import Ember from 'ember';
|
|
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
|
import styleBody from 'ghost-admin/mixins/style-body';
|
|
|
|
const {
|
|
RSVP,
|
|
inject: {service}
|
|
} = Ember;
|
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
|
titleToken: 'Settings - General',
|
|
|
|
classNames: ['settings-view-general'],
|
|
|
|
config: service(),
|
|
|
|
beforeModel() {
|
|
this._super(...arguments);
|
|
return this.get('session.user')
|
|
.then(this.transitionAuthor())
|
|
.then(this.transitionEditor());
|
|
},
|
|
|
|
model() {
|
|
return RSVP.hash({
|
|
settings: this.store.queryRecord('setting', {type: 'blog,theme,private'}),
|
|
availableTimezones: this.get('config.availableTimezones')
|
|
});
|
|
},
|
|
|
|
setupController(controller, models) {
|
|
controller.set('model', models.settings);
|
|
controller.set('availableTimezones', models.availableTimezones);
|
|
},
|
|
|
|
actions: {
|
|
save() {
|
|
this.get('controller').send('save');
|
|
}
|
|
}
|
|
});
|