refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
13
app/components/pwa/PwaBadge.client.vue
Normal file
13
app/components/pwa/PwaBadge.client.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<button
|
||||
v-if="useNuxtApp().$pwa?.needRefresh"
|
||||
bg="primary-fade" relative rounded
|
||||
flex="~ gap-1 center" px3 py1 text-primary
|
||||
@click="useNuxtApp().$pwa?.updateServiceWorker()"
|
||||
>
|
||||
<div i-ri-download-cloud-2-line />
|
||||
<h2 flex="~ gap-2" items-center>
|
||||
{{ $t('pwa.update_available_short') }}
|
||||
</h2>
|
||||
</button>
|
||||
</template>
|
22
app/components/pwa/PwaInstallPrompt.client.vue
Normal file
22
app/components/pwa/PwaInstallPrompt.client.vue
Normal file
|
@ -0,0 +1,22 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="useNuxtApp().$pwa?.showInstallPrompt && !useNuxtApp().$pwa?.needRefresh"
|
||||
m-2 p5 bg="primary-fade" relative
|
||||
rounded-lg of-hidden
|
||||
flex="~ col gap-3"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<h2 flex="~ gap-2" items-center>
|
||||
{{ $t('pwa.install_title') }}
|
||||
</h2>
|
||||
<div flex="~ gap-1">
|
||||
<button type="button" btn-solid px-4 py-1 text-center text-sm @click="useNuxtApp().$pwa?.install()">
|
||||
{{ $t('pwa.install') }}
|
||||
</button>
|
||||
<button type="button" btn-text filter-saturate-0 px-4 py-1 text-center text-sm @click="useNuxtApp().$pwa?.cancelInstall()">
|
||||
{{ $t('pwa.dismiss') }}
|
||||
</button>
|
||||
</div>
|
||||
<div i-material-symbols:install-desktop-rounded absolute text-6em bottom--2 inset-ie--2 text-primary dark:text-white op10 class="-z-1 rtl-flip" />
|
||||
</div>
|
||||
</template>
|
21
app/components/pwa/PwaPrompt.client.vue
Normal file
21
app/components/pwa/PwaPrompt.client.vue
Normal file
|
@ -0,0 +1,21 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="useNuxtApp().$pwa?.needRefresh"
|
||||
m-2 p5 bg="primary-fade" relative
|
||||
rounded-lg of-hidden
|
||||
flex="~ col gap-3"
|
||||
>
|
||||
<h2 flex="~ gap-2" items-center>
|
||||
{{ $t('pwa.title') }}
|
||||
</h2>
|
||||
<div flex="~ gap-1">
|
||||
<button type="button" btn-solid px-4 py-1 text-center text-sm @click="useNuxtApp().$pwa?.updateServiceWorker()">
|
||||
{{ $t('pwa.update') }}
|
||||
</button>
|
||||
<button type="button" btn-text filter-saturate-0 px-4 py-1 text-center text-sm @click="useNuxtApp().$pwa?.close()">
|
||||
{{ $t('pwa.dismiss') }}
|
||||
</button>
|
||||
</div>
|
||||
<div i-ri-arrow-down-circle-line absolute text-8em bottom--10 inset-ie--10 text-primary dark:text-white op10 class="-z-1" />
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue