mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
# Conflicts: # app/api/auth.ts # app/api/common.ts # app/azure.ts # app/client/api.ts # app/client/platforms/openai.ts # app/components/chat.tsx # app/components/settings.tsx # app/constant.ts # app/layout.tsx # app/masks/index.ts # app/store/chat.ts # app/store/config.ts # app/utils/hooks.ts # app/utils/model.ts # package.json # yarn.lock
95 lines
2.7 KiB
TypeScript
95 lines
2.7 KiB
TypeScript
/* eslint-disable @next/next/no-page-custom-font */
|
|
import "./styles/globals.scss";
|
|
import "./styles/markdown.scss";
|
|
import "./styles/highlight.scss";
|
|
import { getClientConfig } from "./config/client";
|
|
import type { Metadata, Viewport } from "next";
|
|
import { SpeedInsights } from "@vercel/speed-insights/next";
|
|
import { getServerSideConfig } from "./config/server";
|
|
import { GoogleTagManager } from "@next/third-parties/google";
|
|
const serverConfig = getServerSideConfig();
|
|
import { Providers } from "@/app/providers";
|
|
// import { Viewport } from "next";
|
|
|
|
// export const metadata: Metadata = {
|
|
// title: "NextChat",
|
|
// description: "Your personal ChatGPT Chat Bot.",
|
|
// appleWebApp: {
|
|
// title: "NextChat",
|
|
// statusBarStyle: "default",
|
|
// },
|
|
// };
|
|
//
|
|
// export const viewport: Viewport = {
|
|
// width: "device-width",
|
|
// initialScale: 1,
|
|
// maximumScale: 1,
|
|
// themeColor: [
|
|
// { media: "(prefers-color-scheme: light)", color: "#fafafa" },
|
|
// { media: "(prefers-color-scheme: dark)", color: "#151515" },
|
|
// ],
|
|
// };
|
|
|
|
export const viewport: Viewport = {
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#fafafa" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#151515" },
|
|
],
|
|
width: "device-width",
|
|
initialScale: 1,
|
|
maximumScale: 1,
|
|
};
|
|
|
|
export const metadata: Metadata = {
|
|
title: "来聊天吧!",
|
|
description: "你的个人聊天助理。",
|
|
appleWebApp: {
|
|
title: "来聊天吧!",
|
|
statusBarStyle: "default",
|
|
},
|
|
};
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<html lang="en">
|
|
<head>
|
|
<meta name="config" content={JSON.stringify(getClientConfig())} />
|
|
<link
|
|
rel="icon"
|
|
type="image/x-icon"
|
|
href="https://oss.xiaosi.cc/chat/public/favicon.ico"
|
|
/>
|
|
{/*<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />*/}
|
|
|
|
{/*<link*/}
|
|
{/* rel="manifest"*/}
|
|
{/* href="https://oss.xiaosi.cc/chat/public/site.webmanifest"*/}
|
|
{/*></link>*/}
|
|
<link rel="manifest" href="/site.webmanifest"></link>
|
|
<script src="/serviceWorkerRegister.js" defer></script>
|
|
|
|
{/* <script*/}
|
|
{/* src="https://oss.xiaosi.cc/chat/public/serviceWorkerRegister.js"*/}
|
|
{/* defer*/}
|
|
{/*></script>*/}
|
|
</head>
|
|
<body>
|
|
<Providers>{children}</Providers>
|
|
{serverConfig?.isVercel && (
|
|
<>
|
|
<SpeedInsights />
|
|
</>
|
|
)}
|
|
{serverConfig?.gtmId && (
|
|
<>
|
|
<GoogleTagManager gtmId={serverConfig.gtmId} />
|
|
</>
|
|
)}
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|