mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-25 01:41:40 +00:00
Does the following: - Adjusts the shade of red buttons and banners to increase readability and reduce eye strain   - Cleans up factory reset and camera deletion modals   - Removes matchCamerasOnlyByPath as it is no longer used and throws errors in the console  - Limits the criteria to flag a camera mismatch in Camera Matching to only what is necessary based on camera type and highlights differences in table properties (testing on this is appreciated)  - Only displays both saved vs. current info in camera matching if there is a difference between the two  - Some general code cleanup (reduced unnecessary padding/margin/row-col statements, style="display:flex;" -> class="d-flex", etc. - Moves Compact Mode button to the bottom away from all the menu items (cleaner imo, open to thoughts) - Establishes a general spacing format for cards and pages and applies this to existing cards and pages to create a consistent look and feel to the UI (e.g. keeping things in line and less erratic spacing/placement of UI elements)     - Delete protection for camera matching modules - Anti-backend-spam for activate/deactivate/delete modules to hopefully prevent any odd behavior from button spamming - Enforces a common camera stream size on camera matching view (NEEDS MORE TESTING)  https://private-user-images.githubusercontent.com/29715865/400783758-dc99c151-b8a7-4367-a173-74c2fc5b2666.mp4?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzYyNTc3NzEsIm5iZiI6MTczNjI1NzQ3MSwicGF0aCI6Ii8yOTcxNTg2NS80MDA3ODM3NTgtZGM5OWMxNTEtYjhhNy00MzY3LWExNzMtNzRjMmZjNWIyNjY2Lm1wND9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAxMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMTA3VDEzNDQzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwOWM1MDc2ZTVlOWZhM2MxYjAwZjAyZTc2MTYyZTk1ZTVmOGFhZmVkMzlmODRlZTk1ODVlOTk2ZGQzZmM0Y2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ovtRnObwbkEfljr9d5fqaory0nH91LWJSSkmrUUe_4Y
100 lines
2.7 KiB
Vue
100 lines
2.7 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from "vue";
|
|
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
|
import { useStateStore } from "@/stores/StateStore";
|
|
|
|
const props = defineProps<{
|
|
// TODO fully update v-model usage in custom components on Vue3 update
|
|
value: number[];
|
|
}>();
|
|
|
|
const emit = defineEmits<{
|
|
(e: "input", value: number[]): void;
|
|
}>();
|
|
|
|
const localValue = computed({
|
|
get: () => props.value,
|
|
set: (v) => emit("input", v)
|
|
});
|
|
|
|
const processingMode = computed<number>({
|
|
get: () => (useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled ? 1 : 0),
|
|
set: (v) => {
|
|
if (useCameraSettingsStore().isCurrentVideoFormatCalibrated) {
|
|
useCameraSettingsStore().changeCurrentPipelineSetting({ solvePNPEnabled: v === 1 }, true);
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<v-card
|
|
:disabled="useCameraSettingsStore().isDriverMode || useStateStore().colorPickingMode"
|
|
class="mt-3"
|
|
color="primary"
|
|
style="height: 100%; display: flex; flex-direction: column"
|
|
>
|
|
<v-row class="pa-3 pb-0 align-center">
|
|
<v-col class="pa-4">
|
|
<p style="color: white">Processing Mode</p>
|
|
<v-btn-toggle v-model="processingMode" mandatory dark class="fill">
|
|
<v-btn color="secondary" :disabled="!useCameraSettingsStore().hasConnected">
|
|
<v-icon left>mdi-square-outline</v-icon>
|
|
<span>2D</span>
|
|
</v-btn>
|
|
<v-btn
|
|
color="secondary"
|
|
:disabled="
|
|
!useCameraSettingsStore().hasConnected || !useCameraSettingsStore().isCurrentVideoFormatCalibrated
|
|
"
|
|
>
|
|
<v-icon left>mdi-cube-outline</v-icon>
|
|
<span>3D</span>
|
|
</v-btn>
|
|
</v-btn-toggle>
|
|
</v-col>
|
|
</v-row>
|
|
<v-row class="pa-3 pt-0 align-center">
|
|
<v-col class="pa-4 pt-0">
|
|
<p style="color: white">Stream Display</p>
|
|
<v-btn-toggle v-model="localValue" :multiple="true" mandatory dark class="fill">
|
|
<v-btn color="secondary" class="fill">
|
|
<v-icon left class="mode-btn-icon">mdi-import</v-icon>
|
|
<span class="mode-btn-label">Raw</span>
|
|
</v-btn>
|
|
<v-btn color="secondary" class="fill">
|
|
<v-icon left class="mode-btn-icon">mdi-export</v-icon>
|
|
<span class="mode-btn-label">Processed</span>
|
|
</v-btn>
|
|
</v-btn-toggle>
|
|
</v-col>
|
|
</v-row>
|
|
</v-card>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.v-btn-toggle.fill {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.v-btn-toggle.fill > .v-btn {
|
|
width: 50%;
|
|
height: 100%;
|
|
}
|
|
|
|
th {
|
|
width: 80px;
|
|
text-align: center;
|
|
}
|
|
|
|
@media only screen and (max-width: 351px) {
|
|
.mode-btn-icon {
|
|
margin: 0 !important;
|
|
}
|
|
.mode-btn-label {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|