mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 15:13:30 +00:00
feat(front): implement app layout and integrate Serwist for service registration
This commit is contained in:
@@ -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>
|
||||
5
front/layouts/default.vue
Normal file
5
front/layouts/default.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user