Skip to content

Commit

Permalink
fix(ui): remove flow samples when leaving guided tour (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye authored Mar 10, 2023
1 parent 93f526c commit 27e26fb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion ui/src/components/flows/FlowEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
ContentCopy: shallowRef(ContentCopy),
ContentSave: shallowRef(ContentSave),
Delete: shallowRef(Delete),
}
},
lastChangeWasGuided: false,
};
},
computed: {
Expand Down Expand Up @@ -90,11 +91,16 @@
if (localStorage.getItem("tourDoneOrSkip") !== "true") {
if (this.guidedProperties.source !== undefined) {
this.content = this.guidedProperties.source
this.lastChangeWasGuided = true;
}
if (this.guidedProperties.saveFlow) {
this.save();
}
}
else if(this.lastChangeWasGuided) {
this.content = "";
this.lastChangeWasGuided = false;
}
}
}
};
Expand Down
10 changes: 9 additions & 1 deletion ui/src/components/onboarding/VueTour.vue
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,23 @@
skipTour(currentStep) {
this.dispatchEvent(currentStep,"skip")
localStorage.setItem("tourDoneOrSkip", "true");
this.$store.commit("core/setGuidedProperties", {
...this.guidedProperties,
tourStarted:false,
saveFlow: false,
executeFlow: false,
validateInputs: true,
monacoRange: undefined,
monacoDisableRange: undefined});
return this.$tours["guidedTour"].stop();
},
finishTour(currentStep) {
this.dispatchEvent(currentStep,"finish")
this.dispatchEvent(currentStep,"executed")
localStorage.setItem("tourDoneOrSkip", "true");
this.$store.commit("core/setGuidedProperties", {
...this.guidedProperties,
tourStarted:false,
flowSource: "",
saveFlow: false,
executeFlow: false,
validateInputs: true,
Expand Down

0 comments on commit 27e26fb

Please sign in to comment.