mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
17 lines
511 B
JavaScript
17 lines
511 B
JavaScript
|
import AuthenticatedRoute from 'ghost-admin/routes/authenticated';
|
||
|
import {inject as service} from '@ember/service';
|
||
|
|
||
|
export default class SettingsDesignNoThemeRoute extends AuthenticatedRoute {
|
||
|
@service store;
|
||
|
|
||
|
themes = this.store.peekAll('theme');
|
||
|
|
||
|
afterModel() {
|
||
|
super.afterModel(...arguments);
|
||
|
let activeTheme = this.themes.findBy('active', true);
|
||
|
if (typeof activeTheme !== 'undefined') {
|
||
|
return this.transitionTo('settings.design.index');
|
||
|
}
|
||
|
}
|
||
|
}
|