b7433acba4
新增角色探索、收藏、世界书和身份资料;接入流式打字、停止重生成、固定记忆、会话分支与导出;适配手机和桌面并保持实验只由后台控制。
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
/** 站点元信息与视口配置,保留系统缩放以支持可访问性。 */
|
|
import type { Metadata, Viewport } from "next";
|
|
import { connection } from "next/server";
|
|
|
|
import { getAppEnvLabel } from "@/lib/environment";
|
|
import "./globals.css";
|
|
|
|
/** 星港品牌与安装元数据。 */
|
|
export const metadata: Metadata = {
|
|
title: "星港 · 数字人空间",
|
|
description: "与有故事的人相遇,让每一段对话继续生长",
|
|
manifest: "/manifest.webmanifest",
|
|
icons: {
|
|
icon: "/icon.svg",
|
|
apple: "/icon.svg",
|
|
},
|
|
appleWebApp: {
|
|
capable: true,
|
|
title: "星港 · 数字人空间",
|
|
statusBarStyle: "default",
|
|
},
|
|
};
|
|
|
|
/** 允许缩放并覆盖安全区,由页面布局补齐系统边距。 */
|
|
export const viewport: Viewport = {
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
viewportFit: "cover",
|
|
|
|
themeColor: "#101010",
|
|
};
|
|
|
|
/** 全站根布局,私有数字人页面自行负责业务鉴权。 */
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{ children: React.ReactNode }>) {
|
|
await connection();
|
|
|
|
const environmentLabel = getAppEnvLabel();
|
|
|
|
return (
|
|
<html lang="zh-CN">
|
|
<body>
|
|
<div
|
|
className="environment-badge"
|
|
aria-label={`当前环境:${environmentLabel}`}
|
|
>
|
|
{environmentLabel}
|
|
</div>
|
|
{children}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|