diff --git a/src/components/task.vue b/src/components/task.vue index 357f26403..d22d99fed 100644 --- a/src/components/task.vue +++ b/src/components/task.vue @@ -162,6 +162,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(); @@ -512,6 +516,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();