mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 16:20:04 +00:00
More minor changes (cleaning up mostly)
This commit is contained in:
@@ -5,6 +5,7 @@ import {useNavigate} from "react-router";
|
|||||||
import {ConfigEndpoint} from "Frontend/generated/endpoints";
|
import {ConfigEndpoint} from "Frontend/generated/endpoints";
|
||||||
import Avatar from "Frontend/components/general/Avatar";
|
import Avatar from "Frontend/components/general/Avatar";
|
||||||
import {CollectionElement} from "@react-types/shared";
|
import {CollectionElement} from "@react-types/shared";
|
||||||
|
import {isAdmin} from "Frontend/util/utils";
|
||||||
|
|
||||||
export default function ProfileMenu() {
|
export default function ProfileMenu() {
|
||||||
const auth = useAuth();
|
const auth = useAuth();
|
||||||
@@ -28,12 +29,12 @@ export default function ProfileMenu() {
|
|||||||
label: "Administration",
|
label: "Administration",
|
||||||
icon: <GearFine/>,
|
icon: <GearFine/>,
|
||||||
onClick: () => navigate("/administration/libraries"),
|
onClick: () => navigate("/administration/libraries"),
|
||||||
showIf: auth.state.user?.roles?.some(a => a?.includes("ADMIN"))
|
showIf: isAdmin(auth)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Help",
|
label: "Help",
|
||||||
icon: <Question/>,
|
icon: <Question/>,
|
||||||
onClick: () => window.open("https://github.com/gameyfin/gameyfin/tree/v2", "_blank")
|
onClick: () => window.open("https://gameyfin.org", "_blank")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Sign Out",
|
label: "Sign Out",
|
||||||
|
|||||||
Reference in New Issue
Block a user