openflexure-microscope-server/webapp/src/components/tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue
Julian Stirling 5074f75442 Merge branch 'fewer-ui-assumptions' into 'v3'
UI customises to available Things

Closes #510 and #385

See merge request openflexure/openflexure-microscope-server!435
2025-11-11 14:36:22 +00:00

72 lines
1.6 KiB
Vue

<template>
<div>
<!--Show calibration actions as specified by the camera.-->
<div
v-for="(action, index) in primaryCalibrationActions"
:key="'primary_cal' + index"
class="uk-child-width-expand"
>
<server-specified-action-button :action-data="action" @finished="$emit('actionFinished')" />
</div>
<div v-if="showExtraSettings">
<div
v-for="(action, index) in secondaryCalibrationActions"
:key="'secondary_cal' + index"
class="uk-child-width-expand"
>
<server-specified-action-button :action-data="action" @finished="$emit('actionFinished')" />
</div>
</div>
</div>
</template>
<script>
import ServerSpecifiedActionButton from "../../../labThingsComponents/serverSpecifiedActionButton.vue";
// Export main app
export default {
name: "CameraCalibrationSettings",
components: {
ServerSpecifiedActionButton,
},
props: {
showExtraSettings: {
type: Boolean,
required: false,
default: true,
},
cameraUri: {
type: String,
required: true,
},
},
data() {
return {
primaryCalibrationActions: [],
secondaryCalibrationActions: [],
};
},
computed: {
actions() {
return this.thingDescription("camera").actions;
},
},
async created() {
this.primaryCalibrationActions = await this.readThingProperty(
"camera",
"primary_calibration_actions",
);
this.secondaryCalibrationActions = await this.readThingProperty(
"camera",
"secondary_calibration_actions",
);
},
};
</script>
<style lang="less"></style>