mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-04 03:11:40 +00:00
Images are before and after comparison. Does the following: - Fixes several styling issues with pv-* input elements, including top padding, vertical alignment, and allocated input width   - Conforms the calibration details modal to overall styling and spacing standards   (left the blank table there on empty calibrations to give the user a sense of what they might see if they don't have any)
56 lines
1.3 KiB
Vue
56 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from "vue";
|
|
import TooltippedLabel from "@/components/common/pv-tooltipped-label.vue";
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
label?: string;
|
|
tooltip?: string;
|
|
// TODO fully update v-model usage in custom components on Vue3 update
|
|
value: number;
|
|
disabled?: boolean;
|
|
inputCols?: number;
|
|
list: string[];
|
|
}>(),
|
|
{
|
|
disabled: false,
|
|
inputCols: 8
|
|
}
|
|
);
|
|
|
|
const emit = defineEmits<{
|
|
(e: "input", value: number): void;
|
|
}>();
|
|
|
|
const localValue = computed({
|
|
get: () => props.value,
|
|
set: (v) => emit("input", v)
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="d-flex">
|
|
<v-col :cols="12 - inputCols" class="d-flex align-center pl-0">
|
|
<tooltipped-label :tooltip="tooltip" :label="label" />
|
|
</v-col>
|
|
<v-col :cols="inputCols" class="d-flex align-center pr-0">
|
|
<v-radio-group v-model="localValue" row dark :mandatory="true" hide-details="auto">
|
|
<v-radio
|
|
v-for="(radioName, index) in list"
|
|
:key="index"
|
|
color="#ffd843"
|
|
:label="radioName"
|
|
:value="index"
|
|
:disabled="disabled"
|
|
/>
|
|
</v-radio-group>
|
|
</v-col>
|
|
</div>
|
|
</template>
|
|
<style scoped>
|
|
.v-input--radio-group {
|
|
padding-top: 0;
|
|
margin-top: 0;
|
|
}
|
|
</style>
|