8e8aed69c0
Replace the browser Notification constructor (tab-must-be-open) with nostr-push Web Push notifications that work even when the browser is closed. - Add service worker (public/sw.js) for receiving and displaying push events - Add nostr-push RPC client (src/lib/nostrPush.ts) using an ephemeral device keypair for signing — the user's Nostr signer is never prompted - Add usePushNotifications hook managing the full lifecycle: SW registration, VAPID key fetch, pushManager.subscribe, and nostr-push registration - Replace the web path in useNativeNotifications with push registration that auto-enables/disables based on the notificationsEnabled encrypted setting - Android native Capacitor path is unchanged - Requires VITE_NOSTR_PUSH_PUBKEY env var (hex pubkey of the nostr-push server)
5 lines
325 B
Bash
5 lines
325 B
Bash
VITE_SENTRY_DSN="https://********************************@*****************.example.com/****************"
|
|
VITE_PLAUSIBLE_DOMAIN="example.tld"
|
|
VITE_PLAUSIBLE_ENDPOINT="https://plausible.example.tld/api/event"
|
|
# Hex pubkey of the nostr-push server (found in nostr-push startup logs as "worker_pubkey")
|
|
VITE_NOSTR_PUSH_PUBKEY="" |