Add "scanning" or "stitching" to the cancel button in smart scan
This commit is contained in:
parent
18e3978134
commit
cae5a03922
3 changed files with 18 additions and 1 deletions
|
|
@ -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 = [];
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue