Ghost/ghost/admin/app/routes/settings/theme.js
Kevin Ansfield 2ca57e7624 Removed unused confirm-leave handling from theme settings screen
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
2021-10-05 11:37:17 +01:00

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'
};
}
});