Release 202506141856

This commit is contained in:
pluja
2025-06-14 18:56:58 +00:00
parent cf5f3b3228
commit effb6689d7
37 changed files with 276 additions and 221 deletions

View File

@@ -5,7 +5,10 @@
import { clientsClaim } from 'workbox-core'
import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching'
import { makeNotificationOptions } from './lib/notificationOptions'
import {
makeBrowserNotificationOptions,
makeBrowserNotificationTitle,
} from './lib/client/notificationOptions'
import type { NotificationData, NotificationPayload } from './lib/serverEventsTypes'
@@ -59,8 +62,8 @@ async function handleNotificationClick(url: string) {
async function showPushNotification(payload: NotificationPayload | null) {
await self.registration.showNotification(
payload?.title ?? 'New Notification',
makeNotificationOptions(payload)
makeBrowserNotificationTitle(payload?.title),
makeBrowserNotificationOptions(payload)
)
}