Fixed liquid-wormhole error when directly accessing /launch

refs b4e750466d

- liquid-wormhole was throwing an error with the previous approach because it appeared to be trying to run it's destroy routines after the element had already been removed or hadn't been rendered yet
This commit is contained in:
Kevin Ansfield 2021-02-09 12:07:44 +00:00
parent b4e750466d
commit 916c12546f
3 changed files with 12 additions and 8 deletions

View File

@ -7,7 +7,6 @@ export default class LaunchController extends Controller {
@service config;
@service router;
@service settings;
@service ui;
queryParams = ['step'];
@ -100,15 +99,9 @@ export default class LaunchController extends Controller {
this.router.transitionTo('dashboard');
}
@action
setup() {
this.ui.set('showTour', false);
}
@action
reset() {
this.step = 'customise-design';
this.skippedSteps = [];
this.ui.set('showTour', true);
}
}

View File

@ -3,6 +3,17 @@ import {inject as service} from '@ember/service';
export default class LaunchRoute extends AuthenticatedRoute {
@service session;
@service ui;
activate() {
// disable before rendering template to avoid issues with liquid-wormhole
// attempting to destroy elements mid-render if disabled via component hooks
this.ui.set('showTour', false);
}
deactivate() {
this.ui.set('showTour', true);
}
beforeModel() {
super.beforeModel(...arguments);

View File

@ -1,4 +1,4 @@
<div class="fullscreen-wizard-container" {{did-insert this.setup}} {{will-destroy this.reset}}>
<div class="fullscreen-wizard-container" {{will-destroy this.reset}}>
<div class="pt7 pb5 pl12 pr12 flex justify-between items-center bb b--whitegrey">
<div class="flex flex-column">
<div class="ttu gh-launch-wizard-step-indicator">{{this.currentStep.position}}</div>