From 2aa60503f19fd9e54fd704e5c6cd8ccc8c2882d7 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Fri, 10 Apr 2026 07:58:36 -0500 Subject: [PATCH] only link to profile settings in status bar for admin users --- web/src/components/Statusbar.tsx | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/web/src/components/Statusbar.tsx b/web/src/components/Statusbar.tsx index 18a0d9ee1..4e7c4053c 100644 --- a/web/src/components/Statusbar.tsx +++ b/web/src/components/Statusbar.tsx @@ -7,6 +7,7 @@ import useStats, { useAutoFrigateStats } from "@/hooks/use-stats"; import { cn } from "@/lib/utils"; import type { ProfilesApiResponse } from "@/types/profile"; import { getProfileColor } from "@/utils/profileColors"; +import { useIsAdmin } from "@/hooks/use-is-admin"; import { useContext, useEffect, useMemo } from "react"; import { useTranslation } from "react-i18next"; import useSWR from "swr"; @@ -18,6 +19,7 @@ import { Link } from "react-router-dom"; export default function Statusbar() { const { t } = useTranslation(["views/system"]); + const isAdmin = useIsAdmin(); const { messages, addMessage, clearMessages } = useContext( StatusBarMessagesContext, @@ -154,9 +156,23 @@ export default function Statusbar() { ); })} - {activeProfile && ( - -
+ {activeProfile && + (isAdmin ? ( + +
+ + + {activeProfile.friendlyName} + +
+ + ) : ( +
- - )} + ))}
{Object.entries(messages).length === 0 ? (