diff --git a/web/src/pages/Dashboard.tsx b/web/src/pages/Dashboard.tsx index b214aef40..c1a9a76ce 100644 --- a/web/src/pages/Dashboard.tsx +++ b/web/src/pages/Dashboard.tsx @@ -18,7 +18,7 @@ import { FaWalking } from "react-icons/fa"; import { LuEar } from "react-icons/lu"; import { TbMovie } from "react-icons/tb"; import MiniEventCard from "@/components/card/MiniEventCard"; -import { Event } from "@/types/event"; +import { Event as FrigateEvent } from "@/types/event"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; export function Dashboard() { @@ -29,7 +29,7 @@ export function Dashboard() { now.setMinutes(now.getMinutes() - 30); return now.getTime() / 1000; }, []); - const { data: events, mutate: updateEvents } = useSWR([ + const { data: events, mutate: updateEvents } = useSWR([ "events", { limit: 10, after: recentTimestamp }, ]); @@ -116,7 +116,10 @@ function Camera({ camera }: { camera: CameraConfig }) { className={`${ detectValue == "ON" ? "text-primary" : "text-gray-400" }`} - onClick={() => sendDetect(detectValue == "ON" ? "OFF" : "ON")} + onClick={(e) => { + e.stopPropagation(); + sendDetect(detectValue == "ON" ? "OFF" : "ON"); + }} > @@ -130,11 +133,12 @@ function Camera({ camera }: { camera: CameraConfig }) { : "text-gray-400" : "text-red-500" } - onClick={() => + onClick={(e) => { + e.stopPropagation(); camera.record.enabled_in_config ? sendRecord(recordValue == "ON" ? "OFF" : "ON") - : {} - } + : {}; + }} > @@ -144,7 +148,10 @@ function Camera({ camera }: { camera: CameraConfig }) { className={`${ snapshotValue == "ON" ? "text-primary" : "text-gray-400" }`} - onClick={() => sendSnapshot(detectValue == "ON" ? "OFF" : "ON")} + onClick={(e) => { + e.stopPropagation(); + sendSnapshot(detectValue == "ON" ? "OFF" : "ON"); + }} > @@ -155,7 +162,10 @@ function Camera({ camera }: { camera: CameraConfig }) { className={`${ audioValue == "ON" ? "text-primary" : "text-gray-400" }`} - onClick={() => sendAudio(detectValue == "ON" ? "OFF" : "ON")} + onClick={(e) => { + e.stopPropagation(); + sendAudio(detectValue == "ON" ? "OFF" : "ON"); + }} > diff --git a/web/themes/theme-blue.css b/web/themes/theme-blue.css index 19bc40364..e07ac2c30 100644 --- a/web/themes/theme-blue.css +++ b/web/themes/theme-blue.css @@ -39,7 +39,7 @@ --accent-foreground: 210 40% 98%; --destructive: 0 62.8% 30.6%; --destructive-foreground: 210 40% 98%; - --border: 217.2 32.6% 17.5%; + --border: 217.2 36.6% 12.5%; --input: 217.2 38.6% 29.5%; --ring: 224.3 76.3% 48%; }