Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> This commit refactors the entire application to replace the 'parties' concept with 'events'. All controllers, models, views, and related files have been updated to reflect this change. The parties table has been replaced with an events table, and all related functionality has been updated accordingly.
27 lines
876 B
JavaScript
Executable File
27 lines
876 B
JavaScript
Executable File
// Add a service worker for processing Web Push notifications:
|
|
//
|
|
// self.addEventListener("push", async (event) => {
|
|
// const { title, options } = await event.data.json()
|
|
// event.waitUntil(self.registration.showNotification(title, options))
|
|
// })
|
|
//
|
|
// self.addEventListener("notificationclick", function(event) {
|
|
// event.notification.close()
|
|
// event.waitUntil(
|
|
// clients.matchAll({ type: "window" }).then((clientList) => {
|
|
// for (let i = 0; i < clientList.length; i++) {
|
|
// let client = clientList[i]
|
|
// let clientPath = (new URL(client.url)).pathname
|
|
//
|
|
// if (clientPath == event.notification.data.path && "focus" in client) {
|
|
// return client.focus()
|
|
// }
|
|
// }
|
|
//
|
|
// if (clients.openWindow) {
|
|
// return clients.openWindow(event.notification.data.path)
|
|
// }
|
|
// })
|
|
// )
|
|
// })
|