diff --git a/webapp/src/components/labThingsComponents/actionButton.vue b/webapp/src/components/labThingsComponents/actionButton.vue index a33319fb..ba320e4d 100644 --- a/webapp/src/components/labThingsComponents/actionButton.vue +++ b/webapp/src/components/labThingsComponents/actionButton.vue @@ -79,6 +79,11 @@ export default { required: false, default: "Submit", }, + cancelLabel: { + type: String, + required: false, + default: "Cancel", + }, canTerminate: { type: Boolean, required: false, @@ -158,7 +163,7 @@ export default { return this.isDisabled || this.isBroken || (this.taskRunning && !this.canTerminate); }, buttonLabel() { - return this.taskRunning && this.canTerminate ? "Cancel" : this.submitLabel; + return this.taskRunning && this.canTerminate ? this.cancelLabel : this.submitLabel; }, buttonClasses() { const classes = []; diff --git a/webapp/src/components/tabContentComponents/actionTab.vue b/webapp/src/components/tabContentComponents/actionTab.vue index bdb5b01e..27389976 100644 --- a/webapp/src/components/tabContentComponents/actionTab.vue +++ b/webapp/src/components/tabContentComponents/actionTab.vue @@ -64,6 +64,7 @@ mode. :force-id="taskId" :force-url="taskUrl" submit-label="" + :cancel-label="cancelLabel" :can-terminate="true" @completed="$emit('completed')" @finished="$emit('finished')" @@ -132,6 +133,11 @@ export default { required: false, default: false, }, + cancelLabel: { + type: String, + required: false, + default: "Cancel", + }, }, emits: ["closeTask", "completed", "finished", "actionStartedExternally"], diff --git a/webapp/src/components/tabContentComponents/slideScanContent.vue b/webapp/src/components/tabContentComponents/slideScanContent.vue index 7aa7079f..d14c5fab 100644 --- a/webapp/src/components/tabContentComponents/slideScanContent.vue +++ b/webapp/src/components/tabContentComponents/slideScanContent.vue @@ -6,6 +6,7 @@ :task-url="taskUrl" :task-info-title="infoPaneTitle" :task-info-stream="displayImageOnRight" + :cancel-label="cancelLabel" @finished="onScanCompleted" @close-task="closeTask" @action-started-externally="startScanning" @@ -103,6 +104,11 @@ export default { if (!this.displayImageOnRight) return null; return "Live stitching preview"; }, + cancelLabel() { + if (!this.scanPhase) return "Cancel"; + if (this.scanPhase === "Complete") return "Cancel"; + return `Cancel ${this.scanPhase}`; + }, }, methods: {