ui_migration lint(fix): changes fixed with lint ecmaversion & es2021
This commit is contained in:
parent
0741e3cf7e
commit
ce19ea3fc0
52 changed files with 242 additions and 193 deletions
|
|
@ -68,8 +68,8 @@ import ActionButton from "../../labThingsComponents/actionButton.vue";
|
|||
|
||||
export default {
|
||||
name: "StatusPane",
|
||||
components: {
|
||||
ActionButton
|
||||
components: {
|
||||
ActionButton,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default {
|
|||
|
||||
components: {
|
||||
devTools,
|
||||
statusPane
|
||||
statusPane,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ import { useIntersectionObserver } from "@vueuse/core";
|
|||
export default {
|
||||
components: {
|
||||
ActionButton,
|
||||
ServerSpecifiedPropertyControl
|
||||
ServerSpecifiedPropertyControl,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -70,10 +70,22 @@ export default {
|
|||
await this.readSettings();
|
||||
},
|
||||
|
||||
mounted() {
|
||||
useIntersectionObserver(
|
||||
this.$refs.backgroundDetectContent,
|
||||
([{ isIntersecting }]) => {
|
||||
this.visibilityChanged(isIntersecting);
|
||||
},
|
||||
{
|
||||
threshold: 0.0,
|
||||
},
|
||||
);
|
||||
},
|
||||
|
||||
methods: {
|
||||
async safeReadSettings() {
|
||||
if (!this.$store.state.connected) return;
|
||||
|
||||
|
||||
try {
|
||||
await this.readSettings();
|
||||
} catch (error) {
|
||||
|
|
@ -111,18 +123,6 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
useIntersectionObserver(
|
||||
this.$refs.backgroundDetectContent,
|
||||
([{ isIntersecting }]) => {
|
||||
this.visibilityChanged(isIntersecting);
|
||||
},
|
||||
{
|
||||
threshold: 0.0,
|
||||
},
|
||||
);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default {
|
|||
|
||||
components: {
|
||||
paneBackgroundDetect,
|
||||
streamDisplay
|
||||
streamDisplay,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
:submit-label="'Autofocus'"
|
||||
:button-primary="true"
|
||||
:submit-on-event="'globalFastAutofocusEvent'"
|
||||
@taskStarted="onAutofocus"
|
||||
@task-started="onAutofocus"
|
||||
@finished="afterAutofocus"
|
||||
@error="modalError"
|
||||
/>
|
||||
|
|
@ -25,7 +25,7 @@ export default {
|
|||
name: "AutofocusControl",
|
||||
|
||||
components: {
|
||||
ActionButton
|
||||
ActionButton,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
components: {
|
||||
ActionButton,
|
||||
positionControl,
|
||||
autofocusControl
|
||||
autofocusControl,
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ and zero position buttons. It also includes the d-pad.
|
|||
<!-- Text boxes to set and view position -->
|
||||
<div class="input-and-buttons-container">
|
||||
<input
|
||||
:key="`setPosition_${key}`"
|
||||
v-for="(_v, key) in setPosition"
|
||||
:key="`setPosition_${key}`"
|
||||
v-model="setPosition[key]"
|
||||
class="uk-form-small numeric-setting-line-input"
|
||||
type="number"
|
||||
|
|
@ -70,7 +70,7 @@ export default {
|
|||
components: {
|
||||
ActionButton,
|
||||
syncPropertyButton,
|
||||
stageControlButtons
|
||||
stageControlButtons,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default {
|
|||
name: "StageControlButtons",
|
||||
methods: {
|
||||
move(x, y, z) {
|
||||
eventBus.emit("globalMoveStepEvent", {x, y, z, absolute: false});
|
||||
eventBus.emit("globalMoveStepEvent", { x, y, z, absolute: false });
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export default {
|
|||
|
||||
components: {
|
||||
paneControl,
|
||||
streamDisplay
|
||||
streamDisplay,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -91,9 +91,11 @@ export default {
|
|||
|
||||
components: {
|
||||
Paginate,
|
||||
EndpointButton
|
||||
EndpointButton,
|
||||
},
|
||||
|
||||
emits: ["scrollTop"],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
maxitems: 20,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export default {
|
|||
([{ isIntersecting }]) => {
|
||||
this.visibilityChanged(isIntersecting);
|
||||
},
|
||||
{ threshold: 0.0 }
|
||||
{ threshold: 0.0 },
|
||||
);
|
||||
|
||||
if (this.src) {
|
||||
|
|
@ -80,19 +80,17 @@ export default {
|
|||
visibilityChanged(isVisible) {
|
||||
// adding this check to avoid error when the viewer is not yet initialized.
|
||||
if (isVisible) {
|
||||
|
||||
if (!this.osdViewer && this.src) {
|
||||
this.loadOpenSeaDragon(this.src);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (this.osdViewer) {
|
||||
this.osdViewer.destroy();
|
||||
this.osdViewer = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
async loadOpenSeaDragon() {
|
||||
if (this.osdViewer) {
|
||||
this.osdViewer.destroy();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
id="thumbnail-stitched-image"
|
||||
class="thumbnail-fit"
|
||||
:src="thumbnailPath"
|
||||
onerror="this.src='/titleiconpink.svg';"
|
||||
onerror="this.src = '/titleiconpink.svg'"
|
||||
@click="requestViewer"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -87,9 +87,9 @@ import EndpointButton from "../../labThingsComponents/endpointButton.vue";
|
|||
// Export main app
|
||||
export default {
|
||||
name: "ScanCard",
|
||||
components: {
|
||||
components: {
|
||||
actionButton,
|
||||
EndpointButton
|
||||
EndpointButton,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
|
@ -107,6 +107,8 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
emits: ["viewer-requested", "update-requested"],
|
||||
|
||||
computed: {
|
||||
downloadStitchFile() {
|
||||
return `${this.$store.getters.baseUri}/smart_scan/get_stitch/${this.scanData.name}`;
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ import OpenSeadragonViewer from "./openSeadragonViewer.vue";
|
|||
|
||||
export default {
|
||||
name: "ScanViewerModal",
|
||||
components: {
|
||||
OpenSeadragonViewer
|
||||
components: {
|
||||
OpenSeadragonViewer,
|
||||
},
|
||||
props: {
|
||||
selectedScan: {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<template>
|
||||
<div
|
||||
ref="galleryDisplay"
|
||||
class="galleryDisplay uk-padding uk-padding-remove-top"
|
||||
>
|
||||
<div ref="galleryDisplay" class="galleryDisplay uk-padding uk-padding-remove-top">
|
||||
<!-- Gallery nav bar -->
|
||||
<nav class="gallery-navbar uk-navbar-container uk-navbar-transparent" uk-navbar="mode: click">
|
||||
<!-- Right side buttons -->
|
||||
|
|
@ -107,12 +104,14 @@ import { useIntersectionObserver } from "@vueuse/core";
|
|||
// Export main app
|
||||
export default {
|
||||
name: "ScanListContent",
|
||||
components: {
|
||||
components: {
|
||||
actionButton,
|
||||
scanCard,
|
||||
ScanViewerModal
|
||||
ScanViewerModal,
|
||||
},
|
||||
|
||||
emits: ["scrollTop"],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
scans: [],
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default {
|
|||
|
||||
components: {
|
||||
CSMCalibrationSettings,
|
||||
miniStreamDisplay
|
||||
miniStreamDisplay,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export default {
|
|||
|
||||
components: {
|
||||
ActionButton,
|
||||
matrixDisplay
|
||||
matrixDisplay,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
|
@ -77,6 +77,8 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
emits: ["recalibrateResponse"],
|
||||
|
||||
data() {
|
||||
return {
|
||||
csmMatrix: undefined,
|
||||
|
|
@ -101,7 +103,7 @@ export default {
|
|||
([{ isIntersecting }]) => {
|
||||
this.visibilityChanged(isIntersecting);
|
||||
},
|
||||
{ threshold: 0.0 }
|
||||
{ threshold: 0.0 },
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ export default {
|
|||
components: {
|
||||
cameraCalibrationSettings,
|
||||
miniStreamDisplay,
|
||||
ServerSpecifiedPropertyControl
|
||||
ServerSpecifiedPropertyControl,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
|
|||
|
|
@ -23,14 +23,13 @@
|
|||
<script>
|
||||
import ServerSpecifiedActionButton from "../../../labThingsComponents/serverSpecifiedActionButton.vue";
|
||||
// vue3 migration
|
||||
import { markRaw } from "vue";
|
||||
|
||||
// Export main app
|
||||
export default {
|
||||
name: "CameraCalibrationSettings",
|
||||
|
||||
components: {
|
||||
ServerSpecifiedActionButton
|
||||
ServerSpecifiedActionButton,
|
||||
},
|
||||
|
||||
props: {
|
||||
|
|
@ -45,6 +44,8 @@ export default {
|
|||
},
|
||||
},
|
||||
|
||||
emits: ["actionFinished"],
|
||||
|
||||
data() {
|
||||
return {
|
||||
primaryCalibrationActions: [],
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default {
|
|||
|
||||
components: {
|
||||
streamSettings,
|
||||
appSettings
|
||||
appSettings,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export default {
|
|||
name: "StageSettings",
|
||||
|
||||
components: {
|
||||
ActionButton
|
||||
ActionButton,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
|
@ -57,7 +57,7 @@ export default {
|
|||
([{ isIntersecting }]) => {
|
||||
this.visibilityChanged(isIntersecting);
|
||||
},
|
||||
{ threshold: 0.0 }
|
||||
{ threshold: 0.0 },
|
||||
);
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ import tabContent from "../genericComponents/tabContent.vue";
|
|||
// vue3 migration
|
||||
import { markRaw } from "vue";
|
||||
|
||||
|
||||
// Export main app
|
||||
export default {
|
||||
name: "SettingsContent",
|
||||
|
|
@ -78,7 +77,7 @@ export default {
|
|||
components: {
|
||||
tabIcon,
|
||||
tabContent,
|
||||
calibrationWizard
|
||||
calibrationWizard,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
|
|
|
|||
|
|
@ -65,10 +65,10 @@
|
|||
:submit-data="{ scan_name: scan_name }"
|
||||
submit-label="Start Smart Scan"
|
||||
:can-terminate="true"
|
||||
@taskStarted="startScanning"
|
||||
@beforeUpdate:taskStatus="taskStatus = $event"
|
||||
@beforeUpdate:progress="progress = $event"
|
||||
@beforeUpdate:log="log = $event"
|
||||
@task-started="startScanning"
|
||||
@before-update:task-status="taskStatus = $event"
|
||||
@before-update:progress="progress = $event"
|
||||
@before-update:log="log = $event"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -143,7 +143,7 @@ export default {
|
|||
actionProgressBar,
|
||||
MiniStreamDisplay,
|
||||
ActionButton,
|
||||
ServerSpecifiedPropertyControl
|
||||
ServerSpecifiedPropertyControl,
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -176,7 +176,11 @@ export default {
|
|||
|
||||
async created() {
|
||||
this.readSettings();
|
||||
this.workflowOptions = await this.readThingProperty("smart_scan", "workflow_display_names", true);
|
||||
this.workflowOptions = await this.readThingProperty(
|
||||
"smart_scan",
|
||||
"workflow_display_names",
|
||||
true,
|
||||
);
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
|
@ -203,16 +207,21 @@ export default {
|
|||
this.workflowName = await this.readThingProperty("smart_scan", "workflow_name");
|
||||
|
||||
if (!this.workflowName) {
|
||||
console.warn("Could not read workflow_name, using default");
|
||||
this.workflowName = "histo_scan_workflow";
|
||||
}
|
||||
console.warn("Could not read workflow_name, using default");
|
||||
this.workflowName = "histo_scan_workflow";
|
||||
}
|
||||
|
||||
if (this.workflowName) {
|
||||
console.log("Current workflow name: ", this.workflowName);
|
||||
this.ready = await this.readThingProperty(this.workflowName, "ready", true);
|
||||
this.workflowSettings = await this.readThingProperty(this.workflowName, "settings_ui", true) || [];
|
||||
this.workflowSettings =
|
||||
(await this.readThingProperty(this.workflowName, "settings_ui", true)) || [];
|
||||
console.log(this.workflowSettings);
|
||||
this.workflowDisplayName = await this.readThingProperty(this.workflowName, "display_name", true);
|
||||
this.workflowDisplayName = await this.readThingProperty(
|
||||
this.workflowName,
|
||||
"display_name",
|
||||
true,
|
||||
);
|
||||
this.workflowBlurb = await this.readThingProperty(this.workflowName, "ui_blurb", true);
|
||||
}
|
||||
},
|
||||
|
|
@ -256,7 +265,7 @@ export default {
|
|||
this.lastStitchedImage = `${this.$store.getters.baseUri}/smart_scan/latest_preview_stitch.jpg?t=${mtime}`;
|
||||
console.log("Updated preview image URL: ", this.lastStitchedImage);
|
||||
}
|
||||
|
||||
|
||||
this.lastScanName = await this.readThingProperty("smart_scan", "latest_scan_name", true);
|
||||
setTimeout(this.pollScan, 1000); // keep rescheduling until it's stopped
|
||||
}
|
||||
|
|
@ -270,7 +279,13 @@ export default {
|
|||
|
||||
// refresh UI
|
||||
await this.readSettings();
|
||||
console.log("readsettings values: ", this.workflowName, this.workflowSettings, this.workflowDisplayName, this.workflowBlurb);
|
||||
console.log(
|
||||
"readsettings values: ",
|
||||
this.workflowName,
|
||||
this.workflowSettings,
|
||||
this.workflowDisplayName,
|
||||
this.workflowBlurb,
|
||||
);
|
||||
} catch (err) {
|
||||
this.modalError(err);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ export default {
|
|||
resizeTimeoutId: setTimeout(this.doneResizing, 500),
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
computed: {
|
||||
streamEnabled: function () {
|
||||
return this.$store.getters.ready && !this.$store.state.disableStream;
|
||||
|
|
@ -65,7 +65,7 @@ export default {
|
|||
},
|
||||
|
||||
mounted() {
|
||||
//set up an intersection observer
|
||||
//set up an intersection observer
|
||||
useIntersectionObserver(
|
||||
this.$refs.streamDisplay,
|
||||
([{ isIntersecting }]) => {
|
||||
|
|
@ -73,7 +73,7 @@ export default {
|
|||
},
|
||||
{
|
||||
threshold: 0.0,
|
||||
}
|
||||
},
|
||||
);
|
||||
// A global signal listener to flash the stream element
|
||||
this.onFlashStream = () => {
|
||||
|
|
@ -81,7 +81,7 @@ export default {
|
|||
};
|
||||
|
||||
eventBus.on("globalFlashStream", this.onFlashStream);
|
||||
|
||||
|
||||
// Mutation observer
|
||||
this.sizeObserver = new ResizeObserver(() => {
|
||||
this.handleResize(); // For any element attached to the observer, run handleResize() on change
|
||||
|
|
@ -141,8 +141,8 @@ export default {
|
|||
|
||||
// Emit a signal to move, acted on by paneControl.vue
|
||||
eventBus.emit("globalMoveInImageCoordinatesEvent", {
|
||||
x:-xRelative,
|
||||
y:-yRelative
|
||||
x: -xRelative,
|
||||
y: -yRelative,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<script>
|
||||
import streamDisplay from "./streamContent.vue";
|
||||
// vue3 migration
|
||||
import { markRaw } from "vue";
|
||||
|
||||
export default {
|
||||
name: "ViewContent",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue