Ghost/ghost/admin/app/routes/design.js
Kevin Ansfield 667506b166 Set up Design settings screen
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
2021-09-14 18:48:26 +01:00

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