Use switch for whether to capture to the microscope
This commit is contained in:
parent
af18850c41
commit
1e12900506
1 changed files with 11 additions and 1 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
<action-button
|
<action-button
|
||||||
thing="camera"
|
thing="camera"
|
||||||
action="capture"
|
action="capture"
|
||||||
:submit-data="{ capture_mode: 'standard' }"
|
:submit-data="submitData"
|
||||||
submit-label="Capture"
|
submit-label="Capture"
|
||||||
:submit-on-event="'globalCaptureEvent'"
|
:submit-on-event="'globalCaptureEvent'"
|
||||||
@response="handleCaptureResponse"
|
@response="handleCaptureResponse"
|
||||||
|
|
@ -42,9 +42,19 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
submitData() {
|
||||||
|
return {
|
||||||
|
capture_mode: "standard",
|
||||||
|
retain_image: this.saveToGallery,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleCaptureResponse: async function (response) {
|
handleCaptureResponse: async function (response) {
|
||||||
// Retrieve the captured image and save it
|
// Retrieve the captured image and save it
|
||||||
|
if (this.saveToGallery) return;
|
||||||
let imageUri = response.output.href;
|
let imageUri = response.output.href;
|
||||||
if (!imageUri) {
|
if (!imageUri) {
|
||||||
this.modalError("No image URI returned from capture task.");
|
this.modalError("No image URI returned from capture task.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue