refactor: 移除 Service Worker 离线缓存 + 统一注册引导文案
- 删除 sw.js、ServiceWorkerRegistrar、offline 页面 - 保留 manifest 和 PWA 图标(添加到主屏幕仍可用) - 注册引导文案统一为"10 秒注册,无需手机号"
This commit is contained in:
@@ -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
@@ -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 />
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user