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-08-22 10:53:26 +03:00
|
|
|
import {inject as injectService} from '@ember/service';
|
2014-12-01 14:39:11 +03:00
|
|
|
|
2015-05-25 21:17:10 +03:00
|
|
|
export default AuthenticatedRoute.extend(styleBody, CurrentUserSettings, {
|
2017-03-17 20:16:21 +03:00
|
|
|
settings: injectService(),
|
2014-12-01 14:39:11 +03:00
|
|
|
|
2017-03-17 20:16:21 +03:00
|
|
|
titleToken: 'Settings - Labs',
|
2014-12-01 14:39:11 +03:00
|
|
|
classNames: ['settings'],
|
2015-05-25 21:17:10 +03:00
|
|
|
|
2015-11-15 14:06:49 +03:00
|
|
|
beforeModel() {
|
|
|
|
this._super(...arguments);
|
2015-04-14 18:04:16 +03:00
|
|
|
return this.get('session.user')
|
2014-12-01 14:39:11 +03:00
|
|
|
.then(this.transitionAuthor())
|
|
|
|
.then(this.transitionEditor());
|
|
|
|
},
|
|
|
|
|
2015-10-28 14:36:45 +03:00
|
|
|
model() {
|
2017-03-17 20:16:21 +03:00
|
|
|
return this.get('settings').reload();
|
2017-05-24 16:36:59 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
resetController(controller, isExiting) {
|
|
|
|
if (isExiting) {
|
|
|
|
controller.reset();
|
|
|
|
}
|
2014-12-01 14:39:11 +03:00
|
|
|
}
|
|
|
|
});
|