refactor(layout, i18n, admin): 优化布局结构与多语言支持

调整 AdminShell 组件的子组件顺序,提升代码可读性。更新 admin-breadcrumb 组件,简化导航标签翻译逻辑,确保多语言支持的一致性。重构 admin-language-switcher 组件,优化语言切换的用户体验,增强界面交互性。更新多语言配置,新增登录界面的副标题,提升用户体验。
This commit is contained in:
2026-05-30 17:46:27 +08:00
parent 36117144dc
commit a550c418e5
64 changed files with 3405 additions and 1378 deletions

View File

@@ -7,8 +7,8 @@ export default function AdminShellLayout({
children: React.ReactNode;
}) {
return (
<ShellAuthGate>
<AdminShell>{children}</AdminShell>
</ShellAuthGate>
<AdminShell>
<ShellAuthGate>{children}</ShellAuthGate>
</AdminShell>
);
}

View File

@@ -9,7 +9,7 @@ export const metadata: Metadata = buildPageMetadata("dashboard", "title");
export default function AdminDashboardPage() {
return (
<ModuleScaffold className="max-w-7xl">
<ModuleScaffold>
<AdminPermissionGate requiredAny={PRD_DASHBOARD_ACCESS_ANY}>
<DashboardConsole />
</AdminPermissionGate>

View File

@@ -0,0 +1,8 @@
/** 登录页锁定一屏高度,避免整页随内容滚动 */
export default function AdminLoginLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return <div className="h-dvh max-h-dvh min-h-0 overflow-hidden">{children}</div>;
}

View File

@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import Script from "next/script";
import { Providers } from "@/components/providers";
import "./globals.css";
@@ -37,7 +38,9 @@ export default function RootLayout({
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
>
<body className="flex min-h-full flex-col">
<script
<Script
id="lottery-admin-locale-bootstrap"
strategy="beforeInteractive"
dangerouslySetInnerHTML={{ __html: ADMIN_LOCALE_BOOTSTRAP }}
/>
<Providers>{children}</Providers>