PWA 改造

This commit is contained in:
wttwins
2025-12-18 02:04:21 +08:00
parent 703b370b34
commit ffb59fb1c9
3 changed files with 43 additions and 2 deletions

BIN
public/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 KiB

View File

@@ -1,4 +1,4 @@
import type { Metadata } from "next";
import type { Metadata, Viewport } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Providers } from "@/components/providers";
@@ -13,9 +13,29 @@ const geistMono = Geist_Mono({
subsets: ["latin"],
});
export const viewport: Viewport = {
themeColor: '#f97316',
width: 'device-width',
initialScale: 1,
maximumScale: 1,
userScalable: false,
};
export const metadata: Metadata = {
title: "AI智能错题本",
description: "基于AI的智能错题管理系统",
description: "基于AI的智能错题管理系统,帮助学生高效整理、分析和复习错题",
appleWebApp: {
capable: true,
statusBarStyle: 'default',
title: '智能错题本',
},
formatDetection: {
telephone: false,
},
icons: {
icon: '/icons/icon.png',
apple: '/icons/icon.png',
},
};
export default function RootLayout({

21
src/app/manifest.ts Normal file
View File

@@ -0,0 +1,21 @@
import type { MetadataRoute } from 'next'
export default function manifest(): MetadataRoute.Manifest {
return {
name: '智能错题本',
short_name: '错题本',
description: 'AI 驱动的智能错题管理系统,帮助学生高效整理、分析和复习错题',
start_url: '/',
display: 'standalone',
background_color: '#ffffff',
theme_color: '#f97316',
orientation: 'portrait',
icons: [
{
src: '/icons/icon.png',
sizes: 'any',
type: 'image/png',
},
],
}
}