2019-03-21 12:33:14 +03:00
|
|
|
import Route from '@ember/routing/route';
|
2022-02-01 21:20:19 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2021-01-18 12:02:44 +03:00
|
|
|
|
|
|
|
export default class HomeRoute extends Route {
|
2022-02-01 21:20:19 +03:00
|
|
|
@service feature;
|
|
|
|
@service modals;
|
2022-05-18 12:13:06 +03:00
|
|
|
@service router;
|
2022-02-01 21:20:19 +03:00
|
|
|
|
|
|
|
beforeModel(transition) {
|
|
|
|
super.beforeModel(...arguments);
|
|
|
|
|
2022-05-18 12:13:06 +03:00
|
|
|
if (transition.to?.queryParams?.firstStart === 'true') {
|
|
|
|
return this.router.transitionTo('setup.done');
|
2022-02-01 21:20:19 +03:00
|
|
|
}
|
|
|
|
|
2022-05-18 12:13:06 +03:00
|
|
|
this.router.transitionTo('dashboard');
|
2019-03-21 12:33:14 +03:00
|
|
|
}
|
2022-02-01 21:20:19 +03:00
|
|
|
|
|
|
|
resetController(controller) {
|
|
|
|
controller.firstStart = false;
|
|
|
|
}
|
2021-01-18 12:02:44 +03:00
|
|
|
}
|