From 35f604348d201c1b759731628859135e202cb2ff Mon Sep 17 00:00:00 2001 From: grimsi <9295182+grimsi@users.noreply.github.com> Date: Sat, 14 Jun 2025 15:44:23 +0200 Subject: [PATCH] More minor changes (cleaning up mostly) --- gameyfin/src/main/frontend/components/ProfileMenu.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gameyfin/src/main/frontend/components/ProfileMenu.tsx b/gameyfin/src/main/frontend/components/ProfileMenu.tsx index 3024b72..cc2823d 100644 --- a/gameyfin/src/main/frontend/components/ProfileMenu.tsx +++ b/gameyfin/src/main/frontend/components/ProfileMenu.tsx @@ -5,6 +5,7 @@ import {useNavigate} from "react-router"; import {ConfigEndpoint} from "Frontend/generated/endpoints"; import Avatar from "Frontend/components/general/Avatar"; import {CollectionElement} from "@react-types/shared"; +import {isAdmin} from "Frontend/util/utils"; export default function ProfileMenu() { const auth = useAuth(); @@ -28,12 +29,12 @@ export default function ProfileMenu() { label: "Administration", icon: , onClick: () => navigate("/administration/libraries"), - showIf: auth.state.user?.roles?.some(a => a?.includes("ADMIN")) + showIf: isAdmin(auth) }, { label: "Help", icon: , - onClick: () => window.open("https://github.com/gameyfin/gameyfin/tree/v2", "_blank") + onClick: () => window.open("https://gameyfin.org", "_blank") }, { label: "Sign Out",