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} thay đổi đang chờ",
|
||||
'sync.pending_other': "{count} thay đổi đang chờ",
|
||||
'sync.now': "Đồng bộ ngay",
|
||||
// — Notifications push & indicateur hors-ligne —
|
||||
'push.device': "Thông báo trên thiết bị này",
|
||||
'push.deviceHint': "Ngay cả khi ứng dụng đã đóng. Các lựa chọn bên dưới cũng được áp dụng.",
|
||||
'push.iosInstall': "Trên iPhone và iPad, trước tiên hãy thêm AzuuCine vào Màn hình chính (iOS 16.4 trở lên), sau đó mở ứng dụng từ biểu tượng để bật thông báo.",
|
||||
'push.unsupported': "Trình duyệt này không hỗ trợ thông báo đẩy.",
|
||||
'push.denied': "Thông báo đã bị chặn cho trang này. Hãy cho phép trong cài đặt trình duyệt rồi thử lại.",
|
||||
'push.notReady': "Máy chủ chưa hỗ trợ thông báo đẩy.",
|
||||
'push.error': "Không thể bật thông báo. Kiểm tra kết nối rồi thử lại.",
|
||||
'netPill.offlineSync': "Ngoại tuyến — thay đổi của bạn sẽ được đồng bộ",
|
||||
'netPill.offlineLocal': "Ngoại tuyến — mọi thứ vẫn được lưu trên thiết bị này",
|
||||
'netPill.synced': "Đã đồng bộ",
|
||||
'netPill.hide': "Ẩn",
|
||||
}
|
||||
|
||||
export default dict
|
||||
Reference in new issue
Block a user