2
0

layout.tsx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Root Layout - Next.js 14 App Router
  3. * 移动端优化:添加视口设置和安全区域支持
  4. */
  5. import type { Metadata, Viewport } from "next";
  6. import { Inter } from "next/font/google";
  7. import "./globals.css";
  8. import { QueryProvider } from "@/lib/react-query";
  9. const inter = Inter({ subsets: ["latin"] });
  10. export const metadata: Metadata = {
  11. title: "AI MCP Web UI",
  12. description: "AI 对话界面 - 支持 Claude AI 和 MCP 工具调用",
  13. manifest: "/manifest.json",
  14. appleWebApp: {
  15. capable: true,
  16. statusBarStyle: "default",
  17. title: "AI MCP Web UI",
  18. },
  19. };
  20. export const viewport: Viewport = {
  21. width: "device-width",
  22. initialScale: 1,
  23. maximumScale: 1,
  24. userScalable: false,
  25. viewportFit: "cover",
  26. themeColor: "#3b82f6",
  27. };
  28. export default function RootLayout({
  29. children,
  30. }: Readonly<{
  31. children: React.ReactNode;
  32. }>) {
  33. return (
  34. <html lang="zh-CN">
  35. <head>
  36. <meta name="format-detection" content="telephone=no" />
  37. <meta name="mobile-web-app-capable" content="yes" />
  38. <meta name="apple-mobile-web-app-capable" content="yes" />
  39. <meta name="apple-mobile-web-app-status-bar-style" content="default" />
  40. </head>
  41. <body className={inter.className}>
  42. <QueryProvider>{children}</QueryProvider>
  43. </body>
  44. </html>
  45. );
  46. }