Rename calibrationModal to calibrationWizard to avoid confusion with the internal modal element

This commit is contained in:
Julian Stirling 2025-10-22 14:47:14 +01:00
parent c0a8d15628
commit 160c497494
3 changed files with 23 additions and 20 deletions

View file

@ -5,10 +5,10 @@
uk-grid uk-grid
> >
<!-- Initialisation modals --> <!-- Initialisation modals -->
<calibrationModal <calibrationWizard
ref="calibrationModal" ref="calibrationWizard"
@onClose="enterApp()" @onClose="enterApp()"
></calibrationModal> ></calibrationWizard>
<!-- Vertical tab bar --> <!-- Vertical tab bar -->
<div id="switcher-left-container"> <div id="switcher-left-container">
<div <div
@ -112,7 +112,7 @@ import loggingContent from "./tabContentComponents/loggingContent.vue";
import powerContent from "./tabContentComponents/powerContent.vue"; import powerContent from "./tabContentComponents/powerContent.vue";
// Import modal components for device initialisation // Import modal components for device initialisation
import calibrationModal from "./modalComponents/calibrationModal.vue"; import calibrationWizard from "./modalComponents/calibrationWizard.vue";
import TabIcon from "./genericComponents/tabIcon.vue"; import TabIcon from "./genericComponents/tabIcon.vue";
import ScanListContent from "./tabContentComponents/scanListContent.vue"; import ScanListContent from "./tabContentComponents/scanListContent.vue";
@ -127,7 +127,7 @@ export default {
slideScanContent, slideScanContent,
viewContent, viewContent,
settingsContent, settingsContent,
calibrationModal, calibrationWizard,
aboutContent, aboutContent,
loggingContent, loggingContent,
TabIcon, TabIcon,
@ -246,7 +246,7 @@ export default {
this.currentTab = newId; this.currentTab = newId;
}, },
startModals: function() { startModals: function() {
this.$refs.calibrationModal.show(); this.$refs.calibrationWizard.show_if_needed();
}, },
enterApp: function() { enterApp: function() {
// Stuff to do once connected and all init modals are finished // Stuff to do once connected and all init modals are finished

View file

@ -186,13 +186,14 @@
</template> </template>
<script> <script>
import cameraCalibrationSettings from "../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue"; import cameraCalibrationSettings from "../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue";
import CSMCalibrationSettings from "../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue"; import CSMCalibrationSettings from "../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue";
import miniStreamDisplay from "../genericComponents/miniStreamDisplay.vue"; import miniStreamDisplay from "../genericComponents/miniStreamDisplay.vue";
import ActionButton from "../labThingsComponents/actionButton.vue"; import ActionButton from "../labThingsComponents/actionButton.vue";
export default { export default {
name: "CalibrationModal", name: "calibrationWizard",
components: { components: {
cameraCalibrationSettings, cameraCalibrationSettings,
@ -236,7 +237,7 @@ export default {
}, },
methods: { methods: {
show: async function() { show_if_needed: async function() {
// Check if the camera and stage are calibrated, if they can be // Check if the camera and stage are calibrated, if they can be
if (this.canCSMCalibrated) { if (this.canCSMCalibrated) {
let csm = await this.readThingProperty( let csm = await this.readThingProperty(
@ -256,9 +257,7 @@ export default {
if (this.isUseful) { if (this.isUseful) {
this.ready = true; this.ready = true;
this.stepValue = 0; this.stepValue = 0;
// Show the modal this.show()
var el = this.$refs["calibrationModalEl"];
this.showModalElement(el); // Calls the mixin
} else { } else {
// If not useful, we just return the onClose event immediately // If not useful, we just return the onClose event immediately
this.onHide(); this.onHide();
@ -270,9 +269,7 @@ export default {
this.ready = true; this.ready = true;
this.stepValue = 1; this.stepValue = 1;
this.force = true this.force = true
// Show the modal this.show()
var el = this.$refs["calibrationModalEl"];
this.showModalElement(el); // Calls the mixin
}, },
restart: function() { restart: function() {
@ -283,6 +280,12 @@ export default {
} }
}, },
show: function() {
// Show the modal element
var el = this.$refs["calibrationModalEl"];
this.showModalElement(el); // Calls the mixin
},
hide: function() { hide: function() {
// Show the modal // Show the modal
var el = this.$refs["calibrationModalEl"]; var el = this.$refs["calibrationModalEl"];

View file

@ -1,10 +1,10 @@
<template> <template>
<!-- Grid managing tab content --> <!-- Grid managing tab content -->
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove"> <div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
<calibrationModal <calibrationWizard
ref="calibrationModal" ref="calibrationWizard"
@onClose="enterApp()" @onClose="enterApp()"
></calibrationModal> ></calibrationWizard>
<div class="settings-nav"> <div class="settings-nav">
<ul class="uk-nav uk-nav-default"> <ul class="uk-nav uk-nav-default">
<li class="uk-nav-header">Application Settings</li> <li class="uk-nav-header">Application Settings</li>
@ -116,7 +116,7 @@
<script> <script>
import streamSettings from "./settingsComponents/streamSettings.vue"; import streamSettings from "./settingsComponents/streamSettings.vue";
import calibrationModal from "../modalComponents/calibrationModal.vue"; import calibrationWizard from "../modalComponents/calibrationWizard.vue";
import cameraSettings from "./settingsComponents/cameraSettings.vue"; import cameraSettings from "./settingsComponents/cameraSettings.vue";
import appSettings from "./settingsComponents/appSettings.vue"; import appSettings from "./settingsComponents/appSettings.vue";
import CSMSettings from "./settingsComponents/CSMSettings.vue"; import CSMSettings from "./settingsComponents/CSMSettings.vue";
@ -137,7 +137,7 @@ export default {
appSettings, appSettings,
tabIcon, tabIcon,
tabContent, tabContent,
calibrationModal calibrationWizard
}, },
data: function() { data: function() {
@ -154,7 +154,7 @@ export default {
} }
}, },
startModals: function() { startModals: function() {
this.$refs.calibrationModal.force_show(); this.$refs.calibrationWizard.force_show();
} }
} }
}; };