From 812a46d688ec7122d0ae95c736b6f74f0a2fde62 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 10 Sep 2025 06:55:56 -0500 Subject: [PATCH] update default app view --- web/src/App.tsx | 13 ++++++++++++- web/src/components/auth/ProtectedRoute.tsx | 2 +- web/src/types/frigateConfig.ts | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index cd7906e97..2fbfa4c99 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -47,6 +47,9 @@ function App() { } function DefaultAppView() { + const { data: config } = useSWR("config", { + revalidateOnFocus: false, + }); return (
{isDesktop && } @@ -64,7 +67,15 @@ function DefaultAppView() { } + element={ + + } > } /> } /> diff --git a/web/src/components/auth/ProtectedRoute.tsx b/web/src/components/auth/ProtectedRoute.tsx index c35fdaebc..18dc50d53 100644 --- a/web/src/components/auth/ProtectedRoute.tsx +++ b/web/src/components/auth/ProtectedRoute.tsx @@ -6,7 +6,7 @@ import ActivityIndicator from "../indicators/activity-indicator"; export default function ProtectedRoute({ requiredRoles, }: { - requiredRoles: ("admin" | "viewer")[]; + requiredRoles: string[]; }) { const { auth } = useContext(AuthContext); diff --git a/web/src/types/frigateConfig.ts b/web/src/types/frigateConfig.ts index e3cc6455a..70835073c 100644 --- a/web/src/types/frigateConfig.ts +++ b/web/src/types/frigateConfig.ts @@ -342,6 +342,10 @@ export interface FrigateConfig { enabled: boolean; }; + auth: { + roles: string[]; + }; + birdseye: BirdseyeConfig; cameras: {