Notifications push (Web Push) et indicateur hors-ligne / synchro en attente
- Réglages → Notifications : interrupteur « Notifications sur cet appareil » (permission demandée au clic uniquement, iOS : explication « installe l'app », permission refusée, navigateur non compatible). Désinscription à la déconnexion. - Service worker : push-sw.js chargé via workbox.importScripts (affichage + clic qui ouvre/focalise l'app sur le bon écran via « /?open=… »). - Serveur : table push_subscriptions (RLS, anti-SSRF, 10 appareils max), déclencheur pg_net + secret dans Vault, fonction send-push (aes128gcm + VAPID ES256 en WebCrypto, testée sur le vecteur RFC 8291), regroupement des épisodes, préférences notifPrefs, ménage des abonnements expirés. - scripts/gen-vapid.mjs et supabase/PUSH_SETUP.md (étapes manuelles). - Pastille discrète hors-ligne / « N modifications en attente » (mobile au-dessus de la barre de nav, ordinateur dans la barre latérale), basée sur l'état du moteur de synchro existant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
35 files changed
+1779
No files matched your search
@@ -897,6 +897,18 @@ const dict: Translations = {
|
||||
'sync.pending_one': "{count} cambio pendiente",
|
||||
'sync.pending_other': "{count} cambios pendientes",
|
||||
'sync.now': "Sincronizar",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Notificaciones en este dispositivo",
|
||||
'push.deviceHint': "Incluso con la app cerrada. Las opciones de abajo también se aplican.",
|
||||
'push.iosInstall': "En iPhone y iPad, primero añade AzuuCine a la pantalla de inicio (iOS 16.4 o posterior) y abre la app desde su icono para activar las notificaciones.",
|
||||
'push.unsupported': "Este navegador no admite notificaciones push.",
|
||||
'push.denied': "Las notificaciones están bloqueadas para este sitio. Permítelas en los ajustes del navegador y vuelve a intentarlo.",
|
||||
'push.notReady': "Las notificaciones push aún no están disponibles en el servidor.",
|
||||
'push.error': "No se pudieron activar las notificaciones. Comprueba tu conexión e inténtalo de nuevo.",
|
||||
'netPill.offlineSync': "Sin conexión — tus cambios se sincronizarán",
|
||||
'netPill.offlineLocal': "Sin conexión — todo queda guardado en este dispositivo",
|
||||
'netPill.synced': "Sincronizado",
|
||||
'netPill.hide': "Ocultar",
|
||||
}
|
||||
|
||||
export default dict
|
||||
Reference in new issue
Block a user