mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-29 02:21:41 +00:00
Fix camera setup modal not closing and navigation not working (#1979)
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
import CamerasCard from "@/components/dashboard/CamerasCard.vue";
|
||||
import CameraAndPipelineSelectCard from "@/components/dashboard/CameraAndPipelineSelectCard.vue";
|
||||
import StreamConfigCard from "@/components/dashboard/StreamConfigCard.vue";
|
||||
import PipelineConfigCard from "@/components/dashboard/ConfigOptions.vue";
|
||||
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
||||
import { useStateStore } from "@/stores/StateStore";
|
||||
import { PlaceholderCameraSettings } from "@/types/SettingTypes";
|
||||
|
||||
const cameraViewType = computed<number[]>({
|
||||
get: (): number[] => {
|
||||
@@ -39,14 +38,6 @@ const cameraViewType = computed<number[]>({
|
||||
}
|
||||
});
|
||||
|
||||
// TODO - deduplicate with needsCamerasConfigured
|
||||
const warningShown = computed<boolean>(() => {
|
||||
return (
|
||||
Object.values(useCameraSettingsStore().cameras).length === 0 ||
|
||||
PlaceholderCameraSettings.nickname === useCameraSettingsStore().currentCameraName
|
||||
);
|
||||
});
|
||||
|
||||
const arducamWarningShown = computed<boolean>(() => {
|
||||
return Object.values(useCameraSettingsStore().cameras).some(
|
||||
(c) =>
|
||||
@@ -58,6 +49,8 @@ const arducamWarningShown = computed<boolean>(() => {
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
const showCameraSetupDialog = ref(useCameraSettingsStore().needsCameraConfiguration);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -87,11 +80,17 @@ const arducamWarningShown = computed<boolean>(() => {
|
||||
<PipelineConfigCard />
|
||||
|
||||
<!-- TODO - not sure this belongs here -->
|
||||
<v-dialog v-if="warningShown" v-model="warningShown" :persistent="false" max-width="800" dark>
|
||||
<v-dialog
|
||||
v-if="useCameraSettingsStore().needsCameraConfiguration"
|
||||
v-model="showCameraSetupDialog"
|
||||
max-width="800"
|
||||
dark
|
||||
>
|
||||
<v-card flat color="primary">
|
||||
<v-card-title>Setup some cameras to get started!</v-card-title>
|
||||
<v-card-text>
|
||||
No cameras activated - head to the <a href="#/cameraConfigs">Camera matching tab</a> to set some up!
|
||||
No cameras activated - head to the <router-link to="/cameraConfigs">Camera matching tab</router-link> to set
|
||||
some up!
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
Reference in New Issue
Block a user