From 921cb23f824c3d59ead60f8415ff1f9011d54b87 Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Mon, 11 Mar 2024 15:14:35 -0500
Subject: [PATCH] initial try
---
web/src/components/player/BirdseyeLivePlayer.tsx | 1 +
web/src/pages/Live.tsx | 9 ++++++++-
web/src/pages/UIPlayground.tsx | 11 +++++++++++
web/src/views/live/LiveDashboardView.tsx | 1 +
web/vite.config.ts | 12 ++++++------
5 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/web/src/components/player/BirdseyeLivePlayer.tsx b/web/src/components/player/BirdseyeLivePlayer.tsx
index 7ab4c92d7..145783c20 100644
--- a/web/src/components/player/BirdseyeLivePlayer.tsx
+++ b/web/src/components/player/BirdseyeLivePlayer.tsx
@@ -39,6 +39,7 @@ export default function BirdseyeLivePlayer({
diff --git a/web/src/pages/Live.tsx b/web/src/pages/Live.tsx
index 848283eb0..cbf4fb44d 100644
--- a/web/src/pages/Live.tsx
+++ b/web/src/pages/Live.tsx
@@ -18,9 +18,16 @@ function Live() {
if (cameraGroup) {
const group = config.camera_groups[cameraGroup];
- return Object.values(config.cameras)
+ console.log(config.cameras);
+ const groupCameras = Object.values(config.cameras)
.filter((conf) => conf.enabled && group.cameras.includes(conf.name))
.sort((aConf, bConf) => aConf.ui.order - bConf.ui.order);
+ if (group.cameras.includes("birdseye")) {
+ groupCameras.push({
+ name: "birdseye",
+ });
+ }
+ return groupCameras;
}
return Object.values(config.cameras)
diff --git a/web/src/pages/UIPlayground.tsx b/web/src/pages/UIPlayground.tsx
index be8531e4e..407bc6f92 100644
--- a/web/src/pages/UIPlayground.tsx
+++ b/web/src/pages/UIPlayground.tsx
@@ -22,6 +22,7 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
+import BirdseyeLivePlayer from "@/components/player/BirdseyeLivePlayer";
// Color data
const colors = [
@@ -184,6 +185,8 @@ function UIPlayground() {
};
const [isEventsReviewTimeline, setIsEventsReviewTimeline] = useState(true);
+ const birdseyeConfig = config?.birdseye;
+ console.log(birdseyeConfig);
return (
<>
@@ -243,6 +246,14 @@ function UIPlayground() {
+
+ {birdseyeConfig && (
+
+ )}
+