diff --git a/apps/frontend/src/components/ui/servers/ServerSidebar.vue b/apps/frontend/src/components/ui/servers/ServerSidebar.vue index c3edaab68..f68a21e0c 100644 --- a/apps/frontend/src/components/ui/servers/ServerSidebar.vue +++ b/apps/frontend/src/components/ui/servers/ServerSidebar.vue @@ -2,7 +2,10 @@
-
+
props.server.general?.owner_id ?? "Ghost"); +const isOwner = computed(() => (auth.value?.user as User | null)?.id === ownerId.value); +const isAdmin = computed(() => isUserAdmin(auth.value?.user)); + +const navLinks = computed(() => [ { icon: SettingsIcon, label: "General", href: `/servers/manage/${serverId}/options` }, { icon: WrenchIcon, label: "Platform", href: `/servers/manage/${serverId}/options/loader` }, { icon: TextQuoteIcon, label: "Startup", href: `/servers/manage/${serverId}/options/startup` }, @@ -48,7 +55,15 @@ const navLinks = [ label: "Billing", href: `/settings/billing#server-${serverId}`, external: true, + shown: isOwner.value, + }, + { + icon: ModrinthIcon, + label: "Admin Billing", + href: `/admin/billing/${ownerId.value}`, + external: true, + shown: isAdmin.value, }, { icon: InfoIcon, label: "Info", href: `/servers/manage/${serverId}/options/info` }, -]; +]);