a07ba77c5a
更新对话气泡星芒标识,提供SVG、ICO与多尺寸PNG,修复标签页旧图标缓存并同步PWA元数据。
58 lines
1.5 KiB
TypeScript
58 lines
1.5 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: [
|
|
{ url: "/stellar-icon-v2.svg", type: "image/svg+xml" },
|
|
{ url: "/favicon.ico?v=stellar-2", sizes: "any" },
|
|
],
|
|
apple: "/stellar-icon-180-v2.png",
|
|
},
|
|
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>
|
|
);
|
|
}
|