mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-25 01:41: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)
49 lines
1.1 KiB
Vue
49 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import TooltippedLabel from "@/components/common/pv-tooltipped-label.vue";
|
|
import { computed } from "vue";
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
label?: string;
|
|
tooltip?: string;
|
|
// TODO fully update v-model usage in custom components on Vue3 update
|
|
value: boolean;
|
|
disabled?: boolean;
|
|
labelCols?: number;
|
|
switchCols?: number;
|
|
dense?: boolean;
|
|
}>(),
|
|
{
|
|
disabled: false,
|
|
labelCols: 2,
|
|
switchCols: 8,
|
|
dense: false
|
|
}
|
|
);
|
|
|
|
const emit = defineEmits<{
|
|
(e: "input", value: boolean): void;
|
|
}>();
|
|
|
|
const localValue = computed({
|
|
get: () => props.value,
|
|
set: (v) => emit("input", v)
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="d-flex">
|
|
<v-col :cols="12 - switchCols || labelCols" class="d-flex align-center pl-0">
|
|
<tooltipped-label :tooltip="tooltip" :label="label" />
|
|
</v-col>
|
|
<v-col :cols="switchCols || 12 - labelCols" class="d-flex align-center pr-0">
|
|
<v-switch v-model="localValue" dark :disabled="disabled" color="#ffd843" hide-details="auto" class="pb-1" />
|
|
</v-col>
|
|
</div>
|
|
</template>
|
|
<style scoped>
|
|
.v-input--selection-controls {
|
|
margin-top: 0px;
|
|
}
|
|
</style>
|