mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 16:14:25 +03:00
f705dda314
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
28 lines
662 B
JavaScript
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);
|
|
}
|
|
}
|