From e7e1f9ccd4d17a01f575b0907903a3dc899ffb59 Mon Sep 17 00:00:00 2001 From: David Callizaya Date: Mon, 2 Oct 2023 14:45:40 -0400 Subject: [PATCH] if no current screen show the interstitial screen if exists --- src/components/task.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/components/task.vue b/src/components/task.vue index b02148849..fcc559b4e 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -164,6 +164,10 @@ export default { task: { handler() { + if (!this.screen) { + // if no current screen show the interstitial screen if exists + this.screen = this.task && this.task.interstitial_screen; + } this.taskId = this.task.id; this.nodeId = this.task.element_id; this.listenForParentChanges(); @@ -528,6 +532,16 @@ export default { this.nodeId = this.initialNodeId; this.requestData = this.value; this.loopContext = this.initialLoopContext; + if ( + this.$parent.task && + !this.$parent.task.screen && + this.$parent.task.allow_interstitial && + this.$parent.task.interstitial_screen + ) { + // if interstitial screen exists, show it + console.log(this.$parent.task.interstitial_screen); + this.screen = this.$parent.task.interstitial_screen; + } }, destroyed() { this.unsubscribeSocketListeners();