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} รายการ",
|
||||
'sync.pending_other': "รอซิงค์ {count} รายการ",
|
||||
'sync.now': "ซิงค์ตอนนี้",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "การแจ้งเตือนบนอุปกรณ์นี้",
|
||||
'push.deviceHint': "แม้ปิดแอปอยู่ ตัวเลือกด้านล่างก็มีผลด้วย",
|
||||
'push.iosInstall': "บน iPhone และ iPad ให้เพิ่ม AzuuCine ไปยังหน้าจอโฮมก่อน (iOS 16.4 ขึ้นไป) แล้วเปิดแอปจากไอคอนเพื่อเปิดการแจ้งเตือน",
|
||||
'push.unsupported': "เบราว์เซอร์นี้ไม่รองรับการแจ้งเตือนแบบพุช",
|
||||
'push.denied': "การแจ้งเตือนถูกบล็อกสำหรับเว็บไซต์นี้ อนุญาตในการตั้งค่าเบราว์เซอร์แล้วลองอีกครั้ง",
|
||||
'push.notReady': "เซิร์ฟเวอร์ยังไม่พร้อมสำหรับการแจ้งเตือนแบบพุช",
|
||||
'push.error': "เปิดการแจ้งเตือนไม่สำเร็จ ตรวจสอบการเชื่อมต่อแล้วลองอีกครั้ง",
|
||||
'netPill.offlineSync': "ออฟไลน์ — การเปลี่ยนแปลงจะซิงค์ภายหลัง",
|
||||
'netPill.offlineLocal': "ออฟไลน์ — ทุกอย่างยังบันทึกอยู่ในอุปกรณ์นี้",
|
||||
'netPill.synced': "ซิงค์แล้ว",
|
||||
'netPill.hide': "ซ่อน",
|
||||
}
|
||||
|
||||
export default dict
|
||||
Reference in new issue
Block a user