Run lint:fix and accept a huge formatting change

This commit is contained in:
Julian Stirling 2025-10-27 18:00:00 +00:00
parent 3900c3e1ad
commit c085d2c0ac
68 changed files with 756 additions and 1047 deletions

View file

@ -4,13 +4,13 @@
<h2 class="uk-modal-title">Microscope Calibration</h2>
<component
v-if="currentTask"
:is="currentTask.component"
v-if="currentTask"
:key="taskIndex"
v-bind="currentTask.props"
:first="isFirstTask"
:final="isFinalTask"
:startOnLast="movingBackward"
:start-on-last="movingBackward"
@next="nextTask"
@back="previousTask"
/>
@ -26,7 +26,7 @@ import cameraStageMappingTask from "./calibrationWizardComponents/cameraStageMap
import finalStep from "./calibrationWizardComponents/finalStep.vue";
export default {
name: "calibrationWizard",
name: "CalibrationWizard",
components: {},
@ -36,7 +36,7 @@ export default {
availableCalibrationTasks: {},
tasks: [],
taskIndex: 0,
movingBackward: false
movingBackward: false,
};
},
@ -49,7 +49,7 @@ export default {
},
isFinalTask() {
return this.taskIndex === this.tasks.length - 1;
}
},
},
mounted() {
@ -57,12 +57,10 @@ export default {
// Check which Things are available on mount.
const allCalibrationTasks = {
camera: cameraCalibrationTask,
camera_stage_mapping: cameraStageMappingTask
camera_stage_mapping: cameraStageMappingTask,
};
this.availableCalibrationTasks = Object.fromEntries(
Object.entries(allCalibrationTasks).filter(([thing]) =>
this.thingAvailable(thing)
)
Object.entries(allCalibrationTasks).filter(([thing]) => this.thingAvailable(thing)),
);
},
@ -81,10 +79,7 @@ export default {
for (const name of calibrateableThings) {
try {
const thingNeedsCal = await this.readThingProperty(
name,
"calibration_required"
);
const thingNeedsCal = await this.readThingProperty(name, "calibration_required");
if (thingNeedsCal) {
needsCalibration.push(name);
}
@ -111,7 +106,7 @@ export default {
if (includeWelcome) {
tasks.push({
component: singleStepTask,
props: { stepComponent: welcomeStep }
props: { stepComponent: welcomeStep },
});
}
@ -124,7 +119,7 @@ export default {
// Always include the final step
tasks.push({
component: singleStepTask,
props: { stepComponent: finalStep }
props: { stepComponent: finalStep },
});
this.tasks = tasks;
@ -192,7 +187,7 @@ export default {
} else {
this.hide();
}
}
}
},
},
};
</script>

View file

@ -23,8 +23,8 @@ gets very confusing.
<div>
<h3 v-if="title">{{ title }}</h3>
<component
v-if="currentStep"
:is="currentStep.component"
v-if="currentStep"
:key="stepIndex"
v-bind="currentStep.props"
/>
@ -37,11 +37,7 @@ gets very confusing.
>
Back
</button>
<button
class="uk-button uk-button-primary uk-margin-left"
type="button"
@click="nextStep"
>
<button class="uk-button uk-button-primary uk-margin-left" type="button" @click="nextStep">
{{ nextButtonText }}
</button>
</p>
@ -50,28 +46,28 @@ gets very confusing.
<script>
export default {
name: "calibrationWizardTask",
name: "CalibrationWizardTask",
props: {
title: {
type: String,
default: null
default: null,
},
first: Boolean,
final: Boolean,
startOnLast: {
type: Boolean,
default: false
default: false,
},
steps: {
type: Array,
required: true
}
required: true,
},
},
data() {
return {
stepIndex: this.startOnLast ? this.steps.length - 1 : 0
stepIndex: this.startOnLast ? this.steps.length - 1 : 0,
};
},
@ -83,10 +79,8 @@ export default {
return !this.first || this.stepIndex > 0;
},
nextButtonText() {
return this.final && this.stepIndex === this.steps.length - 1
? "Finish"
: "Next";
}
return this.final && this.stepIndex === this.steps.length - 1 ? "Finish" : "Next";
},
},
methods: {
@ -111,7 +105,7 @@ export default {
} else {
this.$emit("next");
}
}
}
},
},
};
</script>

View file

@ -14,6 +14,6 @@
<script>
export default {
name: "camCalibrationExplanation"
name: "CamCalibrationExplanation",
};
</script>

View file

@ -6,10 +6,7 @@
<template #below-stream>
<div class="action-button-container">
<cameraCalibrationSettings
:show-extra-settings="false"
:camera-uri="cameraUri"
/>
<cameraCalibrationSettings :show-extra-settings="false" :camera-uri="cameraUri" />
</div>
</template>
</stepTemplateWithStream>
@ -20,18 +17,18 @@ import stepTemplateWithStream from "../stepTemplateWithStream.vue";
import cameraCalibrationSettings from "../../../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue";
export default {
name: "cameraMainCalibrationStep",
name: "CameraMainCalibrationStep",
components: {
stepTemplateWithStream,
cameraCalibrationSettings
cameraCalibrationSettings,
},
computed: {
cameraUri: function() {
return `${this.$store.getters.baseUri}/camera/`;
}
}
},
},
};
</script>

View file

@ -3,7 +3,7 @@
title="Camera Calibration"
:first="first"
:final="final"
:startOnLast="startOnLast"
:start-on-last="startOnLast"
:steps="steps"
@next="$emit('next')"
@back="$emit('back')"
@ -16,7 +16,7 @@ import camCalibrationExplanation from "./cameraCalibrationSteps/camCalibrationEx
import cameraMainCalibrationStep from "./cameraCalibrationSteps/cameraMainCalibrationStep.vue";
export default {
name: "cameraCalibrationTask",
name: "CameraCalibrationTask",
components: { calibrationWizardTask },
props: {
// Standard calibrationWizardTask props below:
@ -24,17 +24,14 @@ export default {
final: Boolean,
startOnLast: {
type: Boolean,
default: false
}
default: false,
},
},
data: function() {
return {
steps: [
{ component: camCalibrationExplanation },
{ component: cameraMainCalibrationStep }
]
steps: [{ component: camCalibrationExplanation }, { component: cameraMainCalibrationStep }],
};
}
},
};
</script>

View file

@ -3,7 +3,7 @@
title="Camera-Stage Mapping"
:first="first"
:final="final"
:startOnLast="startOnLast"
:start-on-last="startOnLast"
:steps="steps"
@next="$emit('next')"
@back="$emit('back')"
@ -17,7 +17,7 @@ import focusStep from "./csmSteps/focusStep.vue";
import runCsmStep from "./csmSteps/runCsmStep.vue";
export default {
name: "cameraCalibrationTask",
name: "CameraCalibrationTask",
components: { calibrationWizardTask },
props: {
// Standard calibrationWizardTask props below:
@ -25,18 +25,14 @@ export default {
final: Boolean,
startOnLast: {
type: Boolean,
default: false
}
default: false,
},
},
data: function() {
return {
steps: [
{ component: csmExplanation },
{ component: focusStep },
{ component: runCsmStep }
]
steps: [{ component: csmExplanation }, { component: focusStep }, { component: runCsmStep }],
};
}
},
};
</script>

View file

@ -17,6 +17,6 @@
<script>
export default {
name: "csmExplanation"
name: "CsmExplanation",
};
</script>

View file

@ -3,10 +3,7 @@
<p>
Use the buttons below to bring the sample into focus.
</p>
<p>
You may also adjust the z position with <b>page up</b> and
<b>page down</b>.
</p>
<p>You may also adjust the z position with <b>page up</b> and <b>page down</b>.</p>
<template #below-stream>
<div class="action-button-container">
<action-button
@ -16,7 +13,7 @@
:button-primary="false"
:submit-data="{ x: 0, y: 0, z: -100 }"
:submit-label="' - '"
:hideOnRun="false"
:hide-on-run="false"
:can-terminate="false"
/>
<action-button
@ -27,7 +24,7 @@
:submit-data="{ x: 0, y: 0, z: 100 }"
:submit-label="'+'"
:can-terminate="false"
:hideOnRun="false"
:hide-on-run="false"
/>
</div>
</template>
@ -38,12 +35,12 @@
import stepTemplateWithStream from "../stepTemplateWithStream.vue";
import ActionButton from "../../../labThingsComponents/actionButton.vue";
export default {
name: "cameraMainCalibrationStep",
name: "CameraMainCalibrationStep",
components: {
stepTemplateWithStream,
ActionButton
}
ActionButton,
},
};
</script>
<style scoped>

View file

@ -17,12 +17,12 @@ import stepTemplateWithStream from "../stepTemplateWithStream.vue";
import CSMCalibrationSettings from "../../../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue";
export default {
name: "cameraMainCalibrationStep",
name: "CameraMainCalibrationStep",
components: {
stepTemplateWithStream,
CSMCalibrationSettings
}
CSMCalibrationSettings,
},
};
</script>

View file

@ -14,6 +14,6 @@
<script>
export default {
name: "finalStep"
name: "FinalStep",
};
</script>

View file

@ -15,7 +15,7 @@ supplied by the wizard.
:title="title"
:first="first"
:final="final"
:startOnLast="startOnLast"
:start-on-last="startOnLast"
:steps="steps"
@next="$emit('next')"
@back="$emit('back')"
@ -26,36 +26,36 @@ supplied by the wizard.
import calibrationWizardTask from "./calibrationWizardTask.vue";
export default {
name: "singleStepTask",
name: "SingleStepTask",
components: { calibrationWizardTask },
props: {
// This must be sent
stepComponent: {
type: Object,
required: true
required: true,
},
// This is optional.
stepProps: {
type: Object,
default: () => ({})
default: () => ({}),
},
// Standard calibrationWizardTask props below:
title: {
type: String,
default: null
default: null,
},
first: Boolean,
final: Boolean,
startOnLast: {
type: Boolean,
default: false
}
default: false,
},
},
data: function() {
return {
steps: [{ component: this.stepComponent, props: this.stepProps }]
steps: [{ component: this.stepComponent, props: this.stepProps }],
};
}
},
};
</script>

View file

@ -10,11 +10,11 @@
import miniStreamDisplay from "../../genericComponents/miniStreamDisplay.vue";
export default {
name: "stepTemplateWithStream",
name: "StepTemplateWithStream",
components: {
miniStreamDisplay
}
miniStreamDisplay,
},
};
</script>

View file

@ -6,8 +6,8 @@
</b>
</p>
<p>
Your microscope will still function, however some functionality will be
limited, and image quality will likely suffer.
Your microscope will still function, however some functionality will be limited, and image
quality will likely suffer.
</p>
<p>
<b>Click Next to begin microscope calibration.</b>
@ -17,6 +17,6 @@
<script>
export default {
name: "welcomeStep"
name: "WelcomeStep",
};
</script>