2016-05-24 15:06:59 +03:00
|
|
|
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
|
|
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
2017-05-29 21:50:03 +03:00
|
|
|
import styleBody from 'ghost-admin/mixins/style-body';
|
2017-10-30 12:38:01 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2016-03-29 11:40:44 +03:00
|
|
|
|
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
2017-10-30 12:38:01 +03:00
|
|
|
settings: service(),
|
2016-03-29 11:40:44 +03:00
|
|
|
|
2017-03-17 20:16:21 +03:00
|
|
|
titleToken: 'Settings - Apps',
|
2016-03-29 11:40:44 +03:00
|
|
|
classNames: ['settings-view-apps'],
|
|
|
|
|
|
|
|
beforeModel() {
|
|
|
|
this._super(...arguments);
|
|
|
|
return this.get('session.user')
|
|
|
|
.then(this.transitionAuthor())
|
|
|
|
.then(this.transitionEditor());
|
|
|
|
},
|
|
|
|
|
2017-03-17 20:16:21 +03:00
|
|
|
// we don't want to set the model property but we do want to ensure we have
|
|
|
|
// up-to-date settings so pause via afterModel
|
|
|
|
afterModel() {
|
|
|
|
return this.get('settings').reload();
|
2016-03-29 11:40:44 +03:00
|
|
|
}
|
|
|
|
});
|