Skip to content

Commit

Permalink
Merge pull request #240 from BBMRI-ERIC/fix/vue_tour_skip_and_footer_…
Browse files Browse the repository at this point in the history
…variable

fix: dont show vue tour on skip button
  • Loading branch information
RadovanTomik committed Jun 21, 2024
2 parents 78794af + 4268f9a commit 86c6903
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/components/VueTour.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
<v-tour
name="myTour"
:steps="steps"
:callbacks="myCallbacks"
/>
</template>

<script>
export default {
data () {
return {
myCallbacks: {
onSkip: this.dontShowVueTour,
onFinish: this.dontShowVueTour
},
steps: [
{
target: "#v-step-0",
Expand Down Expand Up @@ -39,11 +44,7 @@ export default {
header: {
title: "Filter"
},
content: "You also have the option of sorting and filtering your negotiations.",
before: type => new Promise((resolve, reject) => {
localStorage.setItem("show_vue_tour_1", true)
resolve("foo")
})
content: "You also have the option of sorting and filtering your negotiations."
}
]
}
Expand All @@ -53,6 +54,11 @@ export default {
if (!localStorage.getItem("show_vue_tour_1")) {
this.$tours.myTour.start()
}
},
methods: {
dontShowVueTour () {
localStorage.setItem("show_vue_tour_1", true)
}
}
}
</script>
Expand Down

0 comments on commit 86c6903

Please sign in to comment.