From fa49e0e7b121021daf262e4ab6baf2844b1fc37d Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Mon, 9 Mar 2026 15:57:24 -0500 Subject: [PATCH] add active profile badge to settings toolbar --- web/src/pages/Settings.tsx | 45 ++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/web/src/pages/Settings.tsx b/web/src/pages/Settings.tsx index 3137f14f4..0ca568855 100644 --- a/web/src/pages/Settings.tsx +++ b/web/src/pages/Settings.tsx @@ -92,6 +92,8 @@ import { prepareSectionSavePayload, } from "@/utils/configUtil"; import type { ProfileState } from "@/types/profile"; +import { getProfileColor } from "@/utils/profileColors"; +import { Badge } from "@/components/ui/badge"; import ActivityIndicator from "@/components/indicators/activity-indicator"; import RestartDialog from "@/components/overlay/dialog/RestartDialog"; import SaveAllPreviewPopover, { @@ -609,6 +611,10 @@ export default function Settings() { >({}); const { data: config } = useSWR("config"); + const { data: profilesData } = useSWR<{ + profiles: string[]; + active_profile: string | null; + }>("profiles"); const [searchParams] = useSearchParams(); @@ -1217,10 +1223,27 @@ export default function Settings() { /> -
+

{t("menu.settings", { ns: "common" })}

+ {profilesData?.active_profile && ( + { + setPage("profiles"); + setContentMobileOpen(true); + }} + > + {profilesData.active_profile} + + )}
@@ -1405,9 +1428,23 @@ export default function Settings() {
- - {t("menu.settings", { ns: "common" })} - +
+ + {t("menu.settings", { ns: "common" })} + + {profilesData?.active_profile && ( + setPage("profiles")} + > + {profilesData.active_profile} + + )} +
{hasPendingChanges && (