From de70a23ff6eafb15eec0663ff3147e4e6836f484 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 29 May 2026 14:24:27 +0800 Subject: [PATCH] refactor: tighten admin settings toolbar --- .../_components/admin-settings-navigation.tsx | 253 ++++++++++-------- 1 file changed, 142 insertions(+), 111 deletions(-) diff --git a/app/(admin)/settings/_components/admin-settings-navigation.tsx b/app/(admin)/settings/_components/admin-settings-navigation.tsx index acb571cbe..601ff24bb 100644 --- a/app/(admin)/settings/_components/admin-settings-navigation.tsx +++ b/app/(admin)/settings/_components/admin-settings-navigation.tsx @@ -24,6 +24,7 @@ import { import { Separator } from "@/components/ui/separator"; import { ADMIN_SETTINGS_NAV_GROUPS } from "../_lib/settings-navigation"; import type { AdminSettingsNavGroup, AdminSettingsNavItem } from "../_lib/types"; +import { cn } from "@/lib/utils"; import { SettingStatusBadge } from "./setting-status-badge"; function getActiveGroup(activeTab: string) { @@ -53,16 +54,26 @@ function SettingsGroupDropdown({ - {group.title} + +
{group.title}
+
+ {group.description} +
+
{group.items.map((item) => { const Icon = item.icon; @@ -115,14 +126,14 @@ function SettingsQuickAction({ const Icon = item.icon; const className = item.value === activeTab - ? "border-primary bg-primary text-primary-foreground hover:bg-primary/90" - : "border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground"; + ? "border-foreground/10 bg-foreground text-background shadow-sm hover:bg-foreground/90 dark:border-white/20 dark:bg-white dark:text-black dark:hover:bg-white/90" + : "border-transparent bg-transparent text-muted-foreground hover:border-border/80 hover:bg-background hover:text-foreground"; if (item.href) { return ( - - -
-
- - -
- {(activeGroup?.items ?? []).map((item) => ( - - ))} -
-
- -
- {ADMIN_SETTINGS_NAV_GROUPS.map((group) => ( - - ))} - - - -
- {(activeGroup?.items ?? []).map((item) => ( - - ))} -
-
-
- - {activeItem && ActiveIcon ? ( -
-
- -
-
-
-

{activeItem.label}

+
+
+
+
+
+ Admin Console {activeGroup ? ( - - {activeGroup.title} - + <> + + + {activeGroup.title} + + + ) : null} +
+ +
+

+ 系统设置中心 +

+ {activeItem && ActiveIcon ? ( +
+
+ +
+
+
+ + {activeItem.label} + + 当前 +
+
+
+ ) : null} +
+
+ + +
+ +
+
+ + + {activeItem ? ( +

+ {activeItem.description} +

+ ) : null} + +
+ {(activeGroup?.items ?? []).map((item) => ( + + ))} +
+
+ +
+
+ {ADMIN_SETTINGS_NAV_GROUPS.map((group) => ( + + ))} +
+ + + +
+
+ {(activeGroup?.items ?? []).map((item) => ( + + ))} +
+ {activeItem ? ( +

+ {activeItem.description} +

) : null}
-

- {activeItem.description} -

- ) : null} +
); }