Skip to content

Commit

Permalink
Refactoring in WelcomeWidgetFactory.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Austerschulte committed Jun 13, 2024
1 parent 77d93e1 commit 360e723
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/js/bundles/dn_welcome/WelcomeWidgetFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,7 @@ export default class WelcomeWidgetFactory {
}
this._windowToggleTool?.set("active", false);
if (config.startTourOnButtonClick) {
if (!this._tour) {
console.error("dn_intro.Tour component not available." +
"Did you install the latest 'dn_intro' bundle?");
} else {
this._tour.startTour();
}
this.startDnIntroTour();
}
});

Expand All @@ -81,6 +76,15 @@ export default class WelcomeWidgetFactory {
}
}

private startDnIntroTour(): void {
if (!this._tour) {
console.error("Could not start tour. 'dn_intro.Tour' component not available. " +
"Did you install the latest 'dn_intro' bundle?");
} else {
this._tour.startTour();
}
}

set windowToggleTool(tool: WindowToggleTool) {
this._windowToggleTool = tool;
}
Expand Down

0 comments on commit 360e723

Please sign in to comment.