Gate setup and admin navigation
All checks were successful
Build / build (push) Successful in 9m18s
Template Compliance / compliance (push) Successful in 6s
Release Dry Run / release-dry-run (push) Successful in 1m28s

This commit is contained in:
MrSphay
2026-05-15 17:32:26 +02:00
parent 4dbd595061
commit 035a255125
11 changed files with 98 additions and 30 deletions

View File

@@ -1,15 +1,23 @@
import Link from "next/link";
import { Gauge, MonitorPlay, Shield, UserRoundPlus, UsersRound } from "lucide-react";
import { Gauge, MonitorPlay, Shield, UsersRound } from "lucide-react";
const nav = [
{ href: "/dashboard", label: "Dashboard", icon: Gauge },
{ href: "/rooms/@admin", label: "Rooms", icon: MonitorPlay },
{ href: "/friends", label: "Friends", icon: UsersRound },
{ href: "/admin", label: "Admin", icon: Shield },
{ href: "/setup", label: "Setup", icon: UserRoundPlus }
{ href: "/friends", label: "Friends", icon: UsersRound }
];
export function AppShell({ children, active = "Dashboard" }: { children: React.ReactNode; active?: string }) {
export function AppShell({
children,
active = "Dashboard",
isAdmin = false
}: {
children: React.ReactNode;
active?: string;
isAdmin?: boolean;
}) {
const visibleNav = isAdmin ? [...nav, { href: "/admin", label: "Admin", icon: Shield }] : nav;
return (
<div className="app-shell">
<aside className="sidebar">
@@ -18,7 +26,7 @@ export function AppShell({ children, active = "Dashboard" }: { children: React.R
<span>WatchLink</span>
</Link>
<nav className="nav-list" aria-label="Primary">
{nav.map((item) => {
{visibleNav.map((item) => {
const Icon = item.icon;
return (
<Link key={item.href} href={item.href} className={`nav-item ${active === item.label ? "active" : ""}`}>