- 添加 Service Worker 支持后台定时检查提醒 - 实现浏览器通知 API 集成 - 添加设置页面通知开关和测试功能 - 创建同步服务自动将提醒同步到 SW - 优化提醒检查逻辑(30秒间隔,10分钟宽限期) 文件变更: - public/sw.js: Service Worker 主文件 - public/sw-register.ts: SW 注册脚本 - public/manifest.json: PWA 清单文件 - src/services/notification.ts: 通知权限管理 - src/services/swSync.ts: 提醒同步服务 - src/stores/index.ts: 添加同步调用 - src/pages/SettingsPage.tsx: 添加通知开关和测试按钮 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25 lines
532 B
JSON
25 lines
532 B
JSON
{
|
|
"name": "掐日子 - AI 纪念日提醒",
|
|
"short_name": "掐日子",
|
|
"description": "智能纪念日和提醒管理应用",
|
|
"start_url": "/",
|
|
"display": "standalone",
|
|
"background_color": "#faf9f7",
|
|
"theme_color": "#faf9f7",
|
|
"orientation": "portrait-primary",
|
|
"scope": "/",
|
|
"icons": [
|
|
{
|
|
"src": "/favicon.png",
|
|
"sizes": "192x192",
|
|
"type": "image/png"
|
|
},
|
|
{
|
|
"src": "/favicon.png",
|
|
"sizes": "512x512",
|
|
"type": "image/png",
|
|
"purpose": "any maskable"
|
|
}
|
|
]
|
|
}
|