mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 02:59:35 +00:00
feat: integrate Pi backend and Pi Web
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
import type { Metadata, Viewport } from "next";
|
||||
import { Noto_Sans_Mono } from "next/font/google";
|
||||
import { PwaRegistration } from "@/components/PwaRegistration";
|
||||
import "katex/dist/katex.min.css";
|
||||
import "./globals.css";
|
||||
|
||||
const notoSansMono = Noto_Sans_Mono({
|
||||
subsets: ["latin", "cyrillic"],
|
||||
variable: "--font-noto-mono",
|
||||
display: "swap",
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Pi Web",
|
||||
description: "Pi Web interface for the pi coding agent",
|
||||
applicationName: "Pi Web",
|
||||
manifest: "/manifest.webmanifest",
|
||||
icons: {
|
||||
icon: [
|
||||
{
|
||||
url: "/icons/icon-192.png",
|
||||
sizes: "192x192",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
apple: [
|
||||
{
|
||||
url: "/icons/apple-touch-icon.png",
|
||||
sizes: "180x180",
|
||||
type: "image/png",
|
||||
},
|
||||
],
|
||||
},
|
||||
appleWebApp: {
|
||||
capable: true,
|
||||
statusBarStyle: "default",
|
||||
title: "Pi Web",
|
||||
},
|
||||
formatDetection: {
|
||||
telephone: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const viewport: Viewport = {
|
||||
themeColor: [
|
||||
{ media: "(prefers-color-scheme: light)", color: "#ffffff" },
|
||||
{ media: "(prefers-color-scheme: dark)", color: "#1a1a1a" },
|
||||
],
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" translate="no" className={`${notoSansMono.variable} notranslate`} suppressHydrationWarning>
|
||||
<head>
|
||||
<meta name="google" content="notranslate" />
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `(function(){try{var t=localStorage.getItem("pi-theme");if(t==="dark")document.documentElement.classList.add("dark")}catch(e){}})();`,
|
||||
}}
|
||||
/>
|
||||
</head>
|
||||
<body translate="no" className="notranslate" style={{ height: "100dvh", display: "flex", flexDirection: "column" }}>
|
||||
{children}
|
||||
<PwaRegistration />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user