Move all code to old/ to prepare for Nuxt rewrite
This commit is contained in:
parent
6007f4caeb
commit
51ff27c569
33 changed files with 0 additions and 1 deletions
|
@ -1,2 +0,0 @@
|
|||
User-Agent: *
|
||||
Disallow: /
|
25
public/sw.js
25
public/sw.js
|
@ -1,25 +0,0 @@
|
|||
self.addEventListener("push", function (event) {
|
||||
console.log(event);
|
||||
if (!event.data)
|
||||
return;
|
||||
|
||||
const payload = event.data.json();
|
||||
const { body, icon, image, badge, url, title } = payload;
|
||||
const notificationTitle = title ?? "No title";
|
||||
const notificationOptions = {
|
||||
body,
|
||||
icon,
|
||||
image,
|
||||
data: {
|
||||
url,
|
||||
},
|
||||
badge,
|
||||
};
|
||||
|
||||
event.waitUntil(
|
||||
self.registration.showNotification(notificationTitle, notificationOptions)
|
||||
.then(() => {
|
||||
console.log("Web push delivered");
|
||||
})
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue