feat(env, config, i18n): 增强环境配置与多语言支持
更新 .env.example,提供更清晰的 API 配置说明与本地开发环境配置指引。 修改 next.config.ts:支持动态解析允许的开发环境来源(origins),提升配置灵活性。 重构 admin-language-switcher:优化语言切换同步机制,确保语言变更能够及时生效。 优化英文、尼泊尔语与中文语言包中的错误提示文案,进一步明确 API 配置要求。 精简 admin-http.ts:将 API Base URL 校验逻辑抽离至独立模块并统一导出,提升代码可维护性。
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
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,12 +36,10 @@ export default function RootLayout({
|
||||
suppressHydrationWarning
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
>
|
||||
<head>
|
||||
<Script id="admin-locale-bootstrap" strategy="beforeInteractive">
|
||||
{ADMIN_LOCALE_BOOTSTRAP}
|
||||
</Script>
|
||||
</head>
|
||||
<body className="flex min-h-full flex-col">
|
||||
<script
|
||||
dangerouslySetInnerHTML={{ __html: ADMIN_LOCALE_BOOTSTRAP }}
|
||||
/>
|
||||
<Providers>{children}</Providers>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user