mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
667506b166
refs https://github.com/TryGhost/Team/issues/1045 - added blank `/settings/design` route and associated screen - redirects to settings index if associated labs flag is not enabled - when custom theme settings labs flag is enabled, replaced Branding and Theme links with single Design link
25 lines
592 B
JavaScript
25 lines
592 B
JavaScript
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class DashboardRoute extends AuthenticatedRoute {
|
|
@service feature;
|
|
|
|
beforeModel() {
|
|
super.beforeModel(...arguments);
|
|
|
|
if (!this.session.user.isAdmin) {
|
|
return this.transitionTo('site');
|
|
}
|
|
|
|
if (!this.feature.customThemeSettings) {
|
|
return this.transitionTo('settings');
|
|
}
|
|
}
|
|
|
|
buildRouteInfoMetadata() {
|
|
return {
|
|
mainClasses: ['gh-main-wide']
|
|
};
|
|
}
|
|
}
|