Add admin setup page

This commit is contained in:
2026-09-20 18:15:51 +01:00
parent 27676c5a3f
commit f05384d8fe
21 changed files with 1318 additions and 4 deletions
@@ -3,7 +3,7 @@ import LinkList from "@/src/components/twui/elements/LinkList";
import Stack from "@/src/components/twui/layout/Stack";
import { AppContext } from "@/src/pages/__root";
import { useContext } from "react";
import { LayoutDashboard, LogOut, Server, Settings, Users } from "lucide-react";
import { LayoutDashboard, LogOut, Server, Settings, Users, Wrench } from "lucide-react";
const sectionLabel = (label: string) => (
<div className="px-3 pt-6 pb-1.5 text-[11.5px] font-semibold uppercase tracking-[0.08em] text-foreground-light/40 dark:text-foreground-dark/40">
@@ -27,6 +27,9 @@ export default function AdminAsideLinks() {
return null;
}
const is_super_admin =
user_types?.find((t) => t.user_type === "super_admin") !== undefined;
const links: TWUILink[] = [
{ component: sectionLabel("Overview") },
{
@@ -54,6 +57,22 @@ export default function AdminAsideLinks() {
url: "/admin/clients",
icon: <Users size={16} strokeWidth={2} className={iconClassName} />,
},
{ component: sectionLabel("System") },
...(is_super_admin
? [
{
title: "Setup",
url: "/admin/setup",
icon: (
<Wrench
size={16}
strokeWidth={2}
className={iconClassName}
/>
),
},
]
: []),
{ component: sectionLabel("Account") },
{
title: "Settings",