# Conflicts:
#	app/layout.tsx
This commit is contained in:
2026-05-29 17:13:47 +08:00
50 changed files with 1853 additions and 63 deletions

View File

@@ -2,6 +2,7 @@ import type { Metadata } from "next";
import Script from "next/script";
import { AppShell } from "@/components/app-shell";
import { randomUUIDPolyfillScript } from "@/lib/client/random-uuid-polyfill";
import { getShellAuthState } from "@/lib/server/auth/current-user";
import "./globals.css";
export const metadata: Metadata = {
@@ -9,7 +10,8 @@ export const metadata: Metadata = {
description: "智念AIGC平台统一创作图片、视频、局部重绘与智能超清。"
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const auth = await getShellAuthState();
return (
<html lang="zh-CN">
<body>
@@ -18,7 +20,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
strategy="beforeInteractive"
dangerouslySetInnerHTML={{ __html: randomUUIDPolyfillScript }}
/>
<AppShell>{children}</AppShell>
<AppShell user={auth.user} authRequired={auth.authRequired}>{children}</AppShell>
</body>
</html>
);