feat(front): implement app layout and integrate Serwist for service registration

This commit is contained in:
keven1024
2025-03-18 17:57:13 +08:00
parent 472c1f76bc
commit c434c42c7d
2 changed files with 18 additions and 5 deletions

View File

@@ -1,6 +1,14 @@
<!-- app.vue -->
<script setup lang="ts">
// @ts-check
const { $serwist } = useNuxtApp();
$serwist?.addEventListener("installed", () => {
console.log("Serwist installed!");
});
void $serwist?.register({ immediate: true });
</script>
<template>
<div>
<NuxtRouteAnnouncer />
<NuxtWelcome />
</div>
</template>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</template>

View File

@@ -0,0 +1,5 @@
<template>
<div>
<slot />
</div>
</template>