"use client"; /** * PwaInstallDialog PWA 安装弹窗 * * * * 用途:引导用户将 Web App 安装到桌面 * 触发:由 PwaInstallOverlay 在满足安装条件后延迟显示 */ import Image from "next/image"; export interface PwaInstallDialogProps { onClose: () => void; onInstall?: () => void | Promise; } export function PwaInstallDialog({ onClose, onInstall }: PwaInstallDialogProps) { const handleInstall = async () => { if (onInstall) { await onInstall(); } else { // 提示用户使用浏览器"添加到主屏幕"功能 window.alert( "To install: tap the browser menu, then 'Add to Home Screen'.", ); } onClose(); }; return (

Add to Home Screen

Add CozSweet to Home Screen{"\n"}for the best experience

); }