feat: 统一管理端多语言、配置与票据/结算页面重构

This commit is contained in:
2026-05-20 16:27:06 +08:00
parent 37b13278ef
commit 08a11a1589
81 changed files with 2059 additions and 490 deletions

View File

@@ -100,15 +100,18 @@ export function applyAdminUiLocale(loc: AdminApiLocale): void {
}
/** 启动时从 localStorage 恢复(应在客户端尽早调用一次) */
export function hydrateAdminUiLocale(): void {
export function hydrateAdminUiLocale(): AdminApiLocale | null {
if (typeof window === "undefined") {
return;
return null;
}
const stored = readStoredUiLocale();
if (stored) {
setAdminRequestLocale(stored);
document.documentElement.lang = adminHtmlLang(stored);
return stored;
}
return null;
}
/** 供 `admin-http``X-Locale` + `Accept-Language` */