feat: 新增账号设置页面并优化报表与管理端交互样式

This commit is contained in:
2026-05-22 14:34:04 +08:00
parent 2ca2790f07
commit 51891548a5
8 changed files with 208 additions and 43 deletions

View File

@@ -66,7 +66,7 @@ export function AdminLanguageSwitcher() {
</DropdownMenuTrigger>
<DropdownMenuContent
align="end"
className="w-[188px] overflow-hidden rounded-[20px] border border-slate-200 bg-white p-1 shadow-[0_16px_40px_rgba(15,23,42,0.12)]"
className="w-[188px] overflow-hidden rounded-xl border border-slate-200 bg-white p-1 shadow-[0_16px_40px_rgba(15,23,42,0.12)]"
>
<DropdownMenuGroup className="space-y-0.5">
<DropdownMenuLabel className="sr-only">
@@ -79,14 +79,14 @@ export function AdminLanguageSwitcher() {
<DropdownMenuItem
key={code}
className={cn(
"flex min-h-[42px] items-center gap-2 rounded-xl border border-transparent px-2 py-1.5 text-slate-700 outline-none transition",
"flex min-h-[42px] items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-slate-700 outline-none transition",
active
? "border-rose-100 bg-rose-50 text-rose-600"
: "hover:bg-slate-50 focus:bg-slate-50",
)}
onClick={() => void onSelectLocale(code)}
>
<span className="flex size-8 shrink-0 items-center justify-center rounded-xl bg-white text-lg shadow-[inset_0_0_0_1px_rgba(148,163,184,0.16)]">
<span className="flex size-8 shrink-0 items-center justify-center rounded-md bg-white text-lg shadow-[inset_0_0_0_1px_rgba(148,163,184,0.16)]">
{LOCALE_FLAGS[code]}
</span>
<span className="min-w-0 flex-1">

View File

@@ -5,6 +5,7 @@ import {
LogOutIcon,
UserRoundIcon,
} from "lucide-react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useTranslation } from "react-i18next";
import { toast } from "sonner";
@@ -66,9 +67,11 @@ export function ShellToolbar() {
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuItem disabled className="gap-2">
<UserRoundIcon />
{t("toolbar.accountSettings")}
<DropdownMenuItem asChild>
<Link href="/admin/account" className="flex items-center gap-2 cursor-pointer">
<UserRoundIcon className="size-4" />
{t("toolbar.accountSettings")}
</Link>
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />