Ghost/ghost/admin/app/routes/settings-x.js
Daniel Lockyer f705dda314 Updated Admin-X bundling process
refs https://github.com/TryGhost/DevOps/issues/80

- as part of moving Admin-X-Setting towards GA, we want to change it from
  loading the settings externally via a CDN, to bundling it in with
  Admin
- the bulk of the changes here are removing the config in Ghost, setting
  up the copy to the Admin assets dir, and loading the new path in Admin
- several other changes have come along the way as I've cleaned up
  unneeded code
2023-09-19 11:31:55 +02:00

28 lines
662 B
JavaScript

import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
import {inject as service} from '@ember/service';
export default class SettingsXRoute extends AuthenticatedRoute {
@service session;
@service feature;
@service ui;
@service modals;
beforeModel() {
super.beforeModel(...arguments);
if (!this.feature.adminXSettings) {
return this.router.transitionTo('settings');
}
}
activate() {
super.activate(...arguments);
this.ui.set('isFullScreen', true);
}
deactivate() {
super.deactivate(...arguments);
this.ui.set('isFullScreen', false);
}
}