feat: Implement push notification system for admin announcements
- Add a notification manager to handle push notifications and integrate with Nostr events. - Create a push notification service to manage subscription and permission requests. - Introduce components for notification settings and permission prompts in the UI. - Update Nostr store to manage push notification state and enable/disable functionality. - Enhance NostrFeed to send notifications for new admin announcements. - Implement test notification functionality for development purposes.
This commit is contained in:
parent
6c1caac84b
commit
c05f40f1ec
17 changed files with 1316 additions and 13 deletions
|
|
@ -8,9 +8,10 @@ import { Toaster } from '@/components/ui/sonner'
|
|||
import { useNostr } from '@/composables/useNostr'
|
||||
import { identity } from '@/composables/useIdentity'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { config } from '@/lib/config'
|
||||
import { useNostrStore } from '@/stores/nostr'
|
||||
|
||||
const { isConnected, isConnecting, error, connect, disconnect } = useNostr()
|
||||
const nostrStore = useNostrStore()
|
||||
|
||||
const showPasswordDialog = ref(false)
|
||||
|
||||
|
|
@ -43,6 +44,9 @@ onMounted(async () => {
|
|||
|
||||
// Connect to Nostr relays
|
||||
await connect()
|
||||
|
||||
// Check push notification status
|
||||
await nostrStore.checkPushNotificationStatus()
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue