From 7c0badb1af79ee15c13ba8e96884d54be6167d31 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Thu, 23 Oct 2025 00:15:08 +0100 Subject: [PATCH] Autoformat modalComponents --- .../modalComponents/calibrationWizard.vue | 37 +++++++------ .../calibrationWizardTask.vue | 9 ++-- .../camCalibrationExplanation.vue | 3 +- .../cameraMainCalibrationStep.vue | 5 +- .../cameraCalibrationTask.vue | 9 ++-- .../cameraStageMappingTask.vue | 11 ++-- .../csmSteps/csmExplanation.vue | 2 +- .../csmSteps/focusStep.vue | 54 +++++++++---------- .../csmSteps/runCsmStep.vue | 5 +- .../calibrationWizardComponents/finalStep.vue | 7 ++- .../singleStepTask.vue | 17 +++--- .../stepTemplateWithStream.vue | 3 +- .../welcomeStep.vue | 7 ++- 13 files changed, 85 insertions(+), 84 deletions(-) diff --git a/webapp/src/components/modalComponents/calibrationWizard.vue b/webapp/src/components/modalComponents/calibrationWizard.vue index 6a4763fc..72f712b5 100644 --- a/webapp/src/components/modalComponents/calibrationWizard.vue +++ b/webapp/src/components/modalComponents/calibrationWizard.vue @@ -14,7 +14,6 @@ @next="nextTask" @back="previousTask" /> - @@ -61,10 +60,10 @@ export default { camera_stage_mapping: cameraStageMappingTask }; this.availableCalibrationTasks = Object.fromEntries( - Object.entries(allCalibrationTasks) - .filter(([thing]) => this.thingAvailable(thing)) + Object.entries(allCalibrationTasks).filter(([thing]) => + this.thingAvailable(thing) + ) ); - }, methods: { @@ -73,7 +72,7 @@ export default { * * Iterates over `this.availableCalibrationTasks` (set during mounted()) and reads the * `calibration_required` property. - * + * * Returns a list of thing names that report calibration is required. */ async check_things_needing_calibration() { @@ -82,7 +81,10 @@ 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); } @@ -100,14 +102,17 @@ export default { }, /** - * Create the calibration wizard task list dynamically. - */ - create_task_list: function(thingsToCal, includeWelcome=true) { + * Create the calibration wizard task list dynamically. + */ + create_task_list: function(thingsToCal, includeWelcome = true) { const tasks = []; // Optionally include the welcome screen if (includeWelcome) { - tasks.push({ component: singleStepTask, props: { stepComponent: welcomeStep } }); + tasks.push({ + component: singleStepTask, + props: { stepComponent: welcomeStep } + }); } // Add calibration task for each thing @@ -117,14 +122,17 @@ export default { } // Always include the final step - tasks.push({ component: singleStepTask, props: { stepComponent: finalStep } }); + tasks.push({ + component: singleStepTask, + props: { stepComponent: finalStep } + }); this.tasks = tasks; }, show_if_needed: async function() { // Check if the calibration modal is needed, and only show it if it is. - let thingsToCal = await this. check_things_needing_calibration() + let thingsToCal = await this.check_things_needing_calibration(); const needed = thingsToCal.length > 0; // Check if this calibration wizard can actually do anything useful @@ -141,7 +149,7 @@ export default { // Forces modal to show on button press force_show: function() { const allThings = Object.keys(this.availableCalibrationTasks); - + this.resetData(); this.create_task_list(allThings, false); this.show(); @@ -181,8 +189,7 @@ export default { if (this.taskIndex < this.tasks.length - 1) { this.taskIndex = this.taskIndex + 1; return true; - } - else { + } else { this.hide(); } } diff --git a/webapp/src/components/modalComponents/calibrationWizardComponents/calibrationWizardTask.vue b/webapp/src/components/modalComponents/calibrationWizardComponents/calibrationWizardTask.vue index 4acbbf13..7f05222d 100644 --- a/webapp/src/components/modalComponents/calibrationWizardComponents/calibrationWizardTask.vue +++ b/webapp/src/components/modalComponents/calibrationWizardComponents/calibrationWizardTask.vue @@ -39,7 +39,6 @@ Tasks can be divided into multiple steps. diff --git a/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/camCalibrationExplanation.vue b/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/camCalibrationExplanation.vue index 493bd281..8cadb948 100644 --- a/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/camCalibrationExplanation.vue +++ b/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/camCalibrationExplanation.vue @@ -13,8 +13,7 @@ diff --git a/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/cameraMainCalibrationStep.vue b/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/cameraMainCalibrationStep.vue index de748977..07e1ffb4 100644 --- a/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/cameraMainCalibrationStep.vue +++ b/webapp/src/components/modalComponents/calibrationWizardComponents/cameraCalibrationSteps/cameraMainCalibrationStep.vue @@ -16,7 +16,7 @@ \ No newline at end of file + diff --git a/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue b/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue index 4c37dfa8..d2aa0adf 100644 --- a/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue +++ b/webapp/src/components/modalComponents/calibrationWizardComponents/csmSteps/runCsmStep.vue @@ -12,7 +12,7 @@