此提交完成了全项目的国际化适配: 1. 新增多语言翻译文件与基础配置 2. 替换所有硬编码文本为i18n调用 3. 优化语言切换与文档语言同步逻辑 4. 重构部分业务逻辑以支持动态翻译 5. 移除过时代码与硬编码配置
30 lines
959 B
TypeScript
30 lines
959 B
TypeScript
"use client";
|
||
|
||
import type { ReactNode } from "react";
|
||
|
||
import { NetworkStatusBanner } from "@/components/network-status-banner";
|
||
import { PlayerBottomNav } from "@/components/layout/player-bottom-nav";
|
||
|
||
type PlayerAppShellProps = {
|
||
children: ReactNode;
|
||
};
|
||
|
||
/**
|
||
* 玩家端外壳:顶栏(品牌 + 会话)+ 主体 + **底部 Tab 导航**(H5)。
|
||
* 底部栏留白:{@link PlayerBottomNav} 对应 `padding-bottom`.
|
||
*
|
||
* 注意:全局离线横幅和服务器错误覆盖层已在 ErrorProvider 中处理
|
||
* 这里的 NetworkStatusBanner 仅用于 WebSocket 状态显示
|
||
*/
|
||
export function PlayerAppShell({ children }: PlayerAppShellProps): ReactNode {
|
||
return (
|
||
<div className="min-h-dvh bg-white text-foreground">
|
||
<NetworkStatusBanner />
|
||
<main className="mx-auto flex w-full max-w-lg flex-col pb-[calc(4rem+env(safe-area-inset-bottom,0px)+1.5rem)]">
|
||
{children}
|
||
</main>
|
||
<PlayerBottomNav />
|
||
</div>
|
||
);
|
||
}
|