refactor: 移除 Service Worker 离线缓存 + 统一注册引导文案

- 删除 sw.js、ServiceWorkerRegistrar、offline 页面
- 保留 manifest 和 PWA 图标(添加到主屏幕仍可用)
- 注册引导文案统一为"10 秒注册,无需手机号"
This commit is contained in:
2026-02-27 10:38:33 +08:00
parent 4cc9d66403
commit 3335f7f872
6 changed files with 4 additions and 109 deletions
+2 -2
View File
@@ -227,11 +227,11 @@ export default function BlindboxLobbyPage() {
whileTap={{ scale: 0.97 }}
>
<LogIn size={18} />
/
/
</motion.button>
<p className="mt-3 text-[11px] text-dim">
+ 10
10
</p>
</motion.div>
) : loadError ? (
+1 -2
View File
@@ -2,7 +2,7 @@ import type { Metadata, Viewport } from "next";
import { Geist } from "next/font/google";
import "./globals.css";
import GlobalUserBadge from "@/components/GlobalUserBadge";
import ServiceWorkerRegistrar from "@/components/ServiceWorkerRegistrar";
import PageTransition from "@/components/PageTransition";
import ToastProvider from "@/components/ToastProvider";
@@ -40,7 +40,6 @@ export default function RootLayout({
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
</head>
<body className={`${geistSans.variable} font-sans antialiased`}>
<ServiceWorkerRegistrar />
<ToastProvider>
<PageTransition>{children}</PageTransition>
<GlobalUserBadge />
-23
View File
@@ -1,23 +0,0 @@
"use client";
import { WifiOff } from "lucide-react";
export default function OfflinePage() {
return (
<div className="min-h-dvh flex flex-col items-center justify-center px-6 bg-background text-foreground">
<div className="w-16 h-16 rounded-2xl bg-surface flex items-center justify-center mb-6">
<WifiOff className="w-8 h-8 text-muted" />
</div>
<h1 className="text-xl font-bold text-heading mb-2"></h1>
<p className="text-secondary text-center mb-8">
</p>
<button
onClick={() => window.location.reload()}
className="px-6 py-3 bg-accent text-white rounded-xl font-medium active:scale-95 transition-transform"
>
</button>
</div>
);
}