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,
|
required: false,
|
||||||
default: "Submit",
|
default: "Submit",
|
||||||
},
|
},
|
||||||
|
cancelLabel: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: "Cancel",
|
||||||
|
},
|
||||||
canTerminate: {
|
canTerminate: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
|
|
@ -158,7 +163,7 @@ export default {
|
||||||
return this.isDisabled || this.isBroken || (this.taskRunning && !this.canTerminate);
|
return this.isDisabled || this.isBroken || (this.taskRunning && !this.canTerminate);
|
||||||
},
|
},
|
||||||
buttonLabel() {
|
buttonLabel() {
|
||||||
return this.taskRunning && this.canTerminate ? "Cancel" : this.submitLabel;
|
return this.taskRunning && this.canTerminate ? this.cancelLabel : this.submitLabel;
|
||||||
},
|
},
|
||||||
buttonClasses() {
|
buttonClasses() {
|
||||||
const classes = [];
|
const classes = [];
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ mode.
|
||||||
:force-id="taskId"
|
:force-id="taskId"
|
||||||
:force-url="taskUrl"
|
:force-url="taskUrl"
|
||||||
submit-label=""
|
submit-label=""
|
||||||
|
:cancel-label="cancelLabel"
|
||||||
:can-terminate="true"
|
:can-terminate="true"
|
||||||
@completed="$emit('completed')"
|
@completed="$emit('completed')"
|
||||||
@finished="$emit('finished')"
|
@finished="$emit('finished')"
|
||||||
|
|
@ -132,6 +133,11 @@ export default {
|
||||||
required: false,
|
required: false,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
cancelLabel: {
|
||||||
|
type: String,
|
||||||
|
required: false,
|
||||||
|
default: "Cancel",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
emits: ["closeTask", "completed", "finished", "actionStartedExternally"],
|
emits: ["closeTask", "completed", "finished", "actionStartedExternally"],
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
:task-url="taskUrl"
|
:task-url="taskUrl"
|
||||||
:task-info-title="infoPaneTitle"
|
:task-info-title="infoPaneTitle"
|
||||||
:task-info-stream="displayImageOnRight"
|
:task-info-stream="displayImageOnRight"
|
||||||
|
:cancel-label="cancelLabel"
|
||||||
@finished="onScanCompleted"
|
@finished="onScanCompleted"
|
||||||
@close-task="closeTask"
|
@close-task="closeTask"
|
||||||
@action-started-externally="startScanning"
|
@action-started-externally="startScanning"
|
||||||
|
|
@ -103,6 +104,11 @@ export default {
|
||||||
if (!this.displayImageOnRight) return null;
|
if (!this.displayImageOnRight) return null;
|
||||||
return "Live stitching preview";
|
return "Live stitching preview";
|
||||||
},
|
},
|
||||||
|
cancelLabel() {
|
||||||
|
if (!this.scanPhase) return "Cancel";
|
||||||
|
if (this.scanPhase === "Complete") return "Cancel";
|
||||||
|
return `Cancel ${this.scanPhase}`;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue