diff --git a/src/components/editor/loop.vue b/src/components/editor/loop.vue index 32a608794..3e9bbe75c 100644 --- a/src/components/editor/loop.vue +++ b/src/components/editor/loop.vue @@ -138,9 +138,18 @@ export default { data() { return { items: [], + cancelledJobs: [] }; }, mounted() { + if ( + !localStorage.getItem("cancelledJobs") || + localStorage.getItem("cancelledJobs") === "null" + ) { + this.cancelledJobs = []; + } else { + this.cancelledJobs = JSON.parse(localStorage.getItem("cancelledJobs")); + } this.$root.$on("ai-form-generated", (formItems, nonce) => { this.previewAiChanges(formItems, nonce); }); @@ -202,6 +211,9 @@ export default { item.component === "AiSection" && nonce === item.config.aiConfig.nonce ) { + if (this.cancelledJobs.some((element) => element === nonce)) { + return; + } this.$set(item.config.aiConfig, "progress", progress); } }); diff --git a/src/components/editor/multi-column.vue b/src/components/editor/multi-column.vue index bfefdf838..bf8399225 100644 --- a/src/components/editor/multi-column.vue +++ b/src/components/editor/multi-column.vue @@ -150,9 +150,19 @@ export default { data() { return { items: [], + cancelledJobs: [] }; }, mounted() { + if ( + !localStorage.getItem("cancelledJobs") || + localStorage.getItem("cancelledJobs") === "null" + ) { + this.cancelledJobs = []; + } else { + this.cancelledJobs = JSON.parse(localStorage.getItem("cancelledJobs")); + } + this.$root.$on("ai-form-generated", (formItems, nonce) => { this.previewAiChanges(formItems, nonce); }); @@ -241,6 +251,9 @@ export default { item.component === "AiSection" && nonce === item.config.aiConfig.nonce ) { + if (this.cancelledJobs.some((element) => element === nonce)) { + return; + } this.$set(item.config.aiConfig, "progress", progress); } }); diff --git a/src/components/vue-form-builder.vue b/src/components/vue-form-builder.vue index 6ba5f0c38..f2644b6ca 100644 --- a/src/components/vue-form-builder.vue +++ b/src/components/vue-form-builder.vue @@ -549,7 +549,8 @@ export default { variablesTree: [], language: "en", collator: null, - editorContentKey: 0 + editorContentKey: 0, + cancelledJobs: [] }; }, computed: { @@ -658,7 +659,17 @@ export default { this.initiateLanguageSupport(); }, mounted() { + if ( + !localStorage.getItem("cancelledJobs") || + localStorage.getItem("cancelledJobs") === "null" + ) { + this.cancelledJobs = []; + } else { + this.cancelledJobs = JSON.parse(localStorage.getItem("cancelledJobs")); + } + this.checkForCaptchaInLoops(); + this.$root.$on("nested-screen-updated", () => { this.checkForCaptchaInLoops(); }); @@ -1142,6 +1153,9 @@ export default { item.component === "AiSection" && nonce === item.config.aiConfig.nonce ) { + if (this.cancelledJobs.some((element) => element === nonce)) { + return; + } this.$set(item.config.aiConfig, "progress", progress); } });