Port application from Next.js to Nuxt

Nuxt is based on Vue.js and I find their building blocks to be much
neater compared to the React based Next.js.
This commit is contained in:
Hornwitser 2025-03-05 15:36:50 +01:00
parent 8c8b561f1a
commit 250ca9a1ac
45 changed files with 662 additions and 1358 deletions

View file

@ -1 +1,2 @@
User-Agent: *
Disallow: /

25
public/sw.js Normal file
View file

@ -0,0 +1,25 @@
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");
})
);
});