Admin-Panel hinzugefügt

This commit is contained in:
PxlLoewe
2026-02-08 20:12:45 +01:00
parent aded6d1492
commit d5a4118025
2 changed files with 6 additions and 0 deletions

View File

@@ -3,8 +3,12 @@ import Link from "next/link";
import { prisma } from "@repo/db";
import { ChangelogWrapper } from "_components/navbar/ChangelogWrapper";
import ModeSwitchDropdown from "_components/navbar/ModeSwitchDropdown";
import { useSession } from "next-auth/react";
import { getServerSession } from "api/auth/[...nextauth]/auth";
import AdminPanel from "_components/navbar/AdminPanel";
export default async function Navbar({ children }: { children: React.ReactNode }) {
const session = await getServerSession();
const latestChangelog = await prisma.changelog.findFirst({
orderBy: {
createdAt: "desc",
@@ -17,6 +21,7 @@ export default async function Navbar({ children }: { children: React.ReactNode }
<p className="text-xl font-semibold normal-case">VAR Operations Center</p>
<ChangelogWrapper latestChangelog={latestChangelog} />
</div>
{session?.user.permissions.includes("ADMIN_KICK") && <AdminPanel />}
</div>
<div className="flex items-center gap-2">
{children}

View File

@@ -5,6 +5,7 @@ import Navbar from "(app)/_components/Navbar";
import { Audio } from "_components/Audio/Audio";
import { Connection } from "./_components/navbar/Connection";
import { Settings } from "./_components/navbar/Settings";
import AdminPanel from "_components/navbar/AdminPanel";
export const metadata: Metadata = {
title: "VAR: Disponent",