mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
2ca57e7624
no issue - appears to be left-over from copy/paste of an earlier screen re-structure - cleaning up for easier extraction of functionality to new screens / modals
38 lines
962 B
JavaScript
38 lines
962 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import CurrentUserSettings from 'ghost-admin/mixins/current-user-settings';
|
|
import RSVP from 'rsvp';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default AuthenticatedRoute.extend(CurrentUserSettings, {
|
|
settings: service(),
|
|
|
|
beforeModel() {
|
|
this._super(...arguments);
|
|
this.transitionAuthor(this.session.user);
|
|
},
|
|
|
|
model() {
|
|
return RSVP.hash({
|
|
settings: this.settings.reload(),
|
|
themes: this.store.findAll('theme')
|
|
});
|
|
},
|
|
|
|
setupController(controller) {
|
|
controller.set('themes', this.store.peekAll('theme'));
|
|
this.controller.send('reset');
|
|
},
|
|
|
|
actions: {
|
|
activateTheme(theme) {
|
|
return this.controller.send('activateTheme', theme);
|
|
}
|
|
},
|
|
|
|
buildRouteInfoMetadata() {
|
|
return {
|
|
titleToken: 'Settings - Theme'
|
|
};
|
|
}
|
|
});
|