mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
ea98469e6e
no issue - the feature has been GA for a while now so the conditionals are no longer required
23 lines
547 B
JavaScript
23 lines
547 B
JavaScript
import Route from '@ember/routing/route';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class HomeRoute extends Route {
|
|
@service feature;
|
|
@service modals;
|
|
@service router;
|
|
|
|
beforeModel(transition) {
|
|
super.beforeModel(...arguments);
|
|
|
|
if (transition.to?.queryParams?.firstStart === 'true') {
|
|
return this.router.transitionTo('setup.done');
|
|
}
|
|
|
|
this.router.transitionTo('dashboard');
|
|
}
|
|
|
|
resetController(controller) {
|
|
controller.firstStart = false;
|
|
}
|
|
}
|