mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-23 01:21:40 +00:00
## Description Upgrades to Vue 3 and necessary associated dependencies. Also fixes some issues with the layout and adds validation for object detection models. Closes #885, closes #1943, closes #1449. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2024.3.1 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --------- Co-authored-by: Matt M <matthew.morley.ca@gmail.com> Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com> Co-authored-by: samfreund <techguy763@gmail.com>
72 lines
2.6 KiB
Vue
72 lines
2.6 KiB
Vue
<script setup lang="ts">
|
|
import { PVCameraInfo } from "@/types/SettingTypes";
|
|
|
|
const { camera } = defineProps({
|
|
camera: {
|
|
type: PVCameraInfo,
|
|
required: true
|
|
}
|
|
});
|
|
|
|
const cameraInfoFor: any = (camera: PVCameraInfo) => {
|
|
if (camera.PVUsbCameraInfo) {
|
|
return camera.PVUsbCameraInfo;
|
|
}
|
|
if (camera.PVCSICameraInfo) {
|
|
return camera.PVCSICameraInfo;
|
|
}
|
|
if (camera.PVFileCameraInfo) {
|
|
return camera.PVFileCameraInfo;
|
|
}
|
|
return {};
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<v-table density="compact" :style="{ backgroundColor: 'var(--v-primary-base)' }">
|
|
<tbody>
|
|
<tr v-if="cameraInfoFor(camera).dev !== undefined && cameraInfoFor(camera).dev !== null">
|
|
<td>Device Number:</td>
|
|
<td>{{ cameraInfoFor(camera).dev }}</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).name !== undefined && cameraInfoFor(camera).name !== null">
|
|
<td>Name:</td>
|
|
<td>{{ cameraInfoFor(camera).name }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Type:</td>
|
|
<td v-if="camera.PVUsbCameraInfo" class="mb-3">USB Camera</td>
|
|
<td v-else-if="camera.PVCSICameraInfo" class="mb-3">CSI Camera</td>
|
|
<td v-else-if="camera.PVFileCameraInfo" class="mb-3">File Camera</td>
|
|
<td v-else>Unidentified Camera Type</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).baseName !== undefined && cameraInfoFor(camera).baseName !== null">
|
|
<td>Base Name:</td>
|
|
<td>{{ cameraInfoFor(camera).baseName }}</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).vendorId !== undefined && cameraInfoFor(camera).vendorId !== null">
|
|
<td>Vendor ID:</td>
|
|
<td>{{ cameraInfoFor(camera).vendorId }}</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).productId !== undefined && cameraInfoFor(camera).productId !== null">
|
|
<td>Product ID:</td>
|
|
<td>{{ cameraInfoFor(camera).productId }}</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).path !== undefined && cameraInfoFor(camera).path !== null">
|
|
<td>Path:</td>
|
|
<td style="word-break: break-all">{{ cameraInfoFor(camera).path }}</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).uniquePath !== undefined && cameraInfoFor(camera).uniquePath !== null">
|
|
<td>Unique Path:</td>
|
|
<td style="word-break: break-all">{{ cameraInfoFor(camera).uniquePath }}</td>
|
|
</tr>
|
|
<tr v-if="cameraInfoFor(camera).otherPaths !== undefined && cameraInfoFor(camera).otherPaths !== null">
|
|
<td>Other Paths:</td>
|
|
<td>{{ cameraInfoFor(camera).otherPaths }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</v-table>
|
|
</div>
|
|
</template>
|