Autoformat modalComponents
This commit is contained in:
parent
958b28aa94
commit
7c0badb1af
13 changed files with 85 additions and 84 deletions
|
|
@ -14,7 +14,6 @@
|
||||||
@next="nextTask"
|
@next="nextTask"
|
||||||
@back="previousTask"
|
@back="previousTask"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -61,10 +60,10 @@ export default {
|
||||||
camera_stage_mapping: cameraStageMappingTask
|
camera_stage_mapping: cameraStageMappingTask
|
||||||
};
|
};
|
||||||
this.availableCalibrationTasks = Object.fromEntries(
|
this.availableCalibrationTasks = Object.fromEntries(
|
||||||
Object.entries(allCalibrationTasks)
|
Object.entries(allCalibrationTasks).filter(([thing]) =>
|
||||||
.filter(([thing]) => this.thingAvailable(thing))
|
this.thingAvailable(thing)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -82,7 +81,10 @@ export default {
|
||||||
|
|
||||||
for (const name of calibrateableThings) {
|
for (const name of calibrateableThings) {
|
||||||
try {
|
try {
|
||||||
const thingNeedsCal = await this.readThingProperty(name, "calibration_required");
|
const thingNeedsCal = await this.readThingProperty(
|
||||||
|
name,
|
||||||
|
"calibration_required"
|
||||||
|
);
|
||||||
if (thingNeedsCal) {
|
if (thingNeedsCal) {
|
||||||
needsCalibration.push(name);
|
needsCalibration.push(name);
|
||||||
}
|
}
|
||||||
|
|
@ -107,7 +109,10 @@ export default {
|
||||||
|
|
||||||
// Optionally include the welcome screen
|
// Optionally include the welcome screen
|
||||||
if (includeWelcome) {
|
if (includeWelcome) {
|
||||||
tasks.push({ component: singleStepTask, props: { stepComponent: welcomeStep } });
|
tasks.push({
|
||||||
|
component: singleStepTask,
|
||||||
|
props: { stepComponent: welcomeStep }
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add calibration task for each thing
|
// Add calibration task for each thing
|
||||||
|
|
@ -117,14 +122,17 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Always include the final step
|
// Always include the final step
|
||||||
tasks.push({ component: singleStepTask, props: { stepComponent: finalStep } });
|
tasks.push({
|
||||||
|
component: singleStepTask,
|
||||||
|
props: { stepComponent: finalStep }
|
||||||
|
});
|
||||||
|
|
||||||
this.tasks = tasks;
|
this.tasks = tasks;
|
||||||
},
|
},
|
||||||
|
|
||||||
show_if_needed: async function() {
|
show_if_needed: async function() {
|
||||||
// Check if the calibration modal is needed, and only show it if it is.
|
// 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;
|
const needed = thingsToCal.length > 0;
|
||||||
|
|
||||||
// Check if this calibration wizard can actually do anything useful
|
// Check if this calibration wizard can actually do anything useful
|
||||||
|
|
@ -181,8 +189,7 @@ export default {
|
||||||
if (this.taskIndex < this.tasks.length - 1) {
|
if (this.taskIndex < this.tasks.length - 1) {
|
||||||
this.taskIndex = this.taskIndex + 1;
|
this.taskIndex = this.taskIndex + 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
this.hide();
|
this.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ Tasks can be divided into multiple steps.
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "calibrationWizardTask",
|
name: "calibrationWizardTask",
|
||||||
|
|
||||||
|
|
@ -74,7 +73,9 @@ export default {
|
||||||
return !this.first || this.stepIndex > 0;
|
return !this.first || this.stepIndex > 0;
|
||||||
},
|
},
|
||||||
nextButtonText() {
|
nextButtonText() {
|
||||||
return this.final && this.stepIndex === this.steps.length - 1 ? "Finish" : "Next";
|
return this.final && this.stepIndex === this.steps.length - 1
|
||||||
|
? "Finish"
|
||||||
|
: "Next";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -102,5 +103,5 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "camCalibrationExplanation"
|
name: "camCalibrationExplanation"
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import stepTemplateWithStream from "../stepTemplateWithStream.vue"
|
import stepTemplateWithStream from "../stepTemplateWithStream.vue";
|
||||||
import cameraCalibrationSettings from "../../../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue";
|
import cameraCalibrationSettings from "../../../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -32,11 +32,10 @@ export default {
|
||||||
return `${this.$store.getters.baseUri}/camera/`;
|
return `${this.$store.getters.baseUri}/camera/`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.action-button-container {
|
.action-button-container {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,9 @@ export default {
|
||||||
return {
|
return {
|
||||||
steps: [
|
steps: [
|
||||||
{ component: camCalibrationExplanation },
|
{ component: camCalibrationExplanation },
|
||||||
{component: cameraMainCalibrationStep},
|
{ component: cameraMainCalibrationStep }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,5 @@ export default {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -18,5 +18,5 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "csmExplanation"
|
name: "csmExplanation"
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
Use the buttons below to bring the sample into focus.
|
Use the buttons below to bring the sample into focus.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
You may also adjust the z position with <b>page up</b> and <b>page down</b>.
|
You may also adjust the z position with <b>page up</b> and
|
||||||
|
<b>page down</b>.
|
||||||
</p>
|
</p>
|
||||||
<template #below-stream>
|
<template #below-stream>
|
||||||
<div class="action-button-container">
|
<div class="action-button-container">
|
||||||
|
|
@ -34,7 +35,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import stepTemplateWithStream from "../stepTemplateWithStream.vue"
|
import stepTemplateWithStream from "../stepTemplateWithStream.vue";
|
||||||
import ActionButton from "../../../labThingsComponents/actionButton.vue";
|
import ActionButton from "../../../labThingsComponents/actionButton.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "cameraMainCalibrationStep",
|
name: "cameraMainCalibrationStep",
|
||||||
|
|
@ -43,10 +44,9 @@ export default {
|
||||||
stepTemplateWithStream,
|
stepTemplateWithStream,
|
||||||
ActionButton
|
ActionButton
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.action-button-container {
|
.action-button-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row; /* Stack vertically */
|
flex-direction: row; /* Stack vertically */
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import stepTemplateWithStream from "../stepTemplateWithStream.vue"
|
import stepTemplateWithStream from "../stepTemplateWithStream.vue";
|
||||||
import CSMCalibrationSettings from "../../../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue";
|
import CSMCalibrationSettings from "../../../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -28,11 +28,10 @@ export default {
|
||||||
return `${this.$store.getters.baseUri}/camera/`;
|
return `${this.$store.getters.baseUri}/camera/`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.action-button-container {
|
.action-button-container {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "finalStep"
|
name: "finalStep"
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,10 @@ export default {
|
||||||
components: { calibrationWizardTask },
|
components: { calibrationWizardTask },
|
||||||
props: {
|
props: {
|
||||||
// This must be sent
|
// This must be sent
|
||||||
stepComponent: Object,
|
stepComponent: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
// This is optional.
|
// This is optional.
|
||||||
stepProps: {
|
stepProps: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
|
@ -34,15 +37,13 @@ export default {
|
||||||
startOnLast: {
|
startOnLast: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
steps: [
|
steps: [{ component: this.stepComponent, props: this.stepProps }]
|
||||||
{component: this.stepComponent, props: this.stepProps}
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import miniStreamDisplay from "../../genericComponents/miniStreamDisplay.vue";
|
import miniStreamDisplay from "../../genericComponents/miniStreamDisplay.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -16,7 +15,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
miniStreamDisplay
|
miniStreamDisplay
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
</b>
|
</b>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Your microscope will still function, however some functionality will
|
Your microscope will still function, however some functionality will be
|
||||||
be limited, and image quality will likely suffer.
|
limited, and image quality will likely suffer.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<b>Click Next to begin microscope calibration.</b>
|
<b>Click Next to begin microscope calibration.</b>
|
||||||
|
|
@ -16,8 +16,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "welcomeStep"
|
name: "welcomeStep"
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue