Reorganize admin nav by feature and soften light mode.
Sidebar lists one entry per feature; keep hub tabs only for sibling views (events, tickets, ranks/permissions, moderation, radio, analytics, devops). Soft cool-gray light canvas/surface replaces harsh white. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
022fbfa223
commit
dd806d2527
9 files changed
+344
-267
No files matched your search
@@ -30,7 +30,7 @@ export function AdminHubChrome({ children }: { children: ReactNode }) {
|
||||
icon={hub.icon}
|
||||
title={t(hub.titleKey)}
|
||||
subtitle={t(hub.subtitleKey)}
|
||||
tabs={<AdminSectionTabs tabs={tabs} />}
|
||||
tabs={tabs.length > 1 ? <AdminSectionTabs tabs={tabs} /> : undefined}
|
||||
className="admin-hub-panel"
|
||||
>
|
||||
{children}
|
||||
|
||||
@@ -13,18 +13,26 @@ export function AdminNavLink({
|
||||
href,
|
||||
icon,
|
||||
matchPrefixes,
|
||||
matchExcludePrefixes,
|
||||
children,
|
||||
}: {
|
||||
href: string;
|
||||
icon?: ReactNode;
|
||||
matchPrefixes?: string[];
|
||||
matchExcludePrefixes?: string[];
|
||||
children: ReactNode;
|
||||
}) {
|
||||
const pathname = usePathname() ?? "";
|
||||
const { close } = useAdminMobile();
|
||||
|
||||
const excluded = matchExcludePrefixes?.some(
|
||||
(p) => pathname === p || pathname.startsWith(`${p}/`),
|
||||
);
|
||||
|
||||
let active: boolean;
|
||||
if (href === "/admin") {
|
||||
if (excluded) {
|
||||
active = false;
|
||||
} else if (href === "/admin") {
|
||||
active = pathname === "/admin";
|
||||
} else if (matchPrefixes?.length) {
|
||||
active = matchPrefixes.some(
|
||||
|
||||
Reference in new issue
Block a user