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;
|
|
|
|
|
|
|
|
beforeModel(transition) {
|
|
|
|
super.beforeModel(...arguments);
|
|
|
|
|
|
|
|
if (this.feature.improvedOnboarding && transition.to?.queryParams?.firstStart === 'true') {
|
2022-03-02 15:44:11 +03:00
|
|
|
return this.transitionTo('setup.done');
|
2022-02-01 21:20:19 +03:00
|
|
|
}
|
|
|
|
|
2021-01-21 12:11:51 +03:00
|
|
|
this.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
|
|
|
}
|