Loading client/src/components/Tour/Tour.vue +8 −2 Original line number Diff line number Diff line Loading @@ -86,6 +86,9 @@ export default { isLast() { return this.currentIndex === this.steps.length - 1; }, hasBegun() { return this.currentIndex >= 1; }, }, beforeDestroy() { window.removeEventListener("keyup", this.handleKeyup); Loading @@ -105,12 +108,15 @@ export default { } }, loginRequired(user) { return this.requirements.indexOf("logged_in") >= 0 && user.isAnonymous; return !this.hasBegun && this.requirements.indexOf("logged_in") >= 0 && user.isAnonymous; }, adminRequired(user) { return this.requirements.indexOf("admin") >= 0 && !user.is_admin; return !this.hasBegun && this.requirements.indexOf("admin") >= 0 && !user.is_admin; }, newHistoryRequired(history) { if (this.hasBegun) { return false; } const hasNewNistoryRequirement = this.requirements.indexOf("new_history") >= 0; if (!hasNewNistoryRequirement) { return false; Loading client/src/components/Tour/runTour.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import { mountVueComponent } from "utils/mountVueComponent"; import Tour from "./Tour"; // delays and maximum number of attempts to wait for element const attempts = 100; const attempts = 200; const delay = 200; // return tour data Loading Loading
client/src/components/Tour/Tour.vue +8 −2 Original line number Diff line number Diff line Loading @@ -86,6 +86,9 @@ export default { isLast() { return this.currentIndex === this.steps.length - 1; }, hasBegun() { return this.currentIndex >= 1; }, }, beforeDestroy() { window.removeEventListener("keyup", this.handleKeyup); Loading @@ -105,12 +108,15 @@ export default { } }, loginRequired(user) { return this.requirements.indexOf("logged_in") >= 0 && user.isAnonymous; return !this.hasBegun && this.requirements.indexOf("logged_in") >= 0 && user.isAnonymous; }, adminRequired(user) { return this.requirements.indexOf("admin") >= 0 && !user.is_admin; return !this.hasBegun && this.requirements.indexOf("admin") >= 0 && !user.is_admin; }, newHistoryRequired(history) { if (this.hasBegun) { return false; } const hasNewNistoryRequirement = this.requirements.indexOf("new_history") >= 0; if (!hasNewNistoryRequirement) { return false; Loading
client/src/components/Tour/runTour.js +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ import { mountVueComponent } from "utils/mountVueComponent"; import Tour from "./Tour"; // delays and maximum number of attempts to wait for element const attempts = 100; const attempts = 200; const delay = 200; // return tour data Loading