feat: add iOS Safari install guide and improve PWA UX with neutral theme

- Add iOS Safari install prompt with step-by-step modal guide
- Fix Telegram environment detection (check initData, not just SDK presence)
- Fix install prompt re-entrancy issue (clear deferredPrompt immediately)
- Extract icon components to separate file (web/src/components/icons.tsx)
- Rename "Happy App" to "Hapi" throughout the UI and manifests
- Change button/icon colors from blue (--app-button) to neutral theme (--app-fg/--app-bg)
- Add install dismiss state to prevent repeated prompts
- Improve iOS Safari detection with robust user agent parsing
This commit is contained in:
weishu
2025-12-18 14:05:50 +08:00
parent ea9f0f3b1a
commit be00343289
9 changed files with 232 additions and 13 deletions
+16
View File
@@ -145,3 +145,19 @@ html[data-theme="dark"] .shiki span {
animation: rainbow-wave 2s linear infinite, sparkle-wave 2s ease-in-out infinite;
font-weight: 600;
}
/* PWA install prompt animation */
@keyframes slide-up {
from {
transform: translateY(100%);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.animate-slide-up {
animation: slide-up 0.3s ease-out;
}