refactor: use nuxt plugin to provide pwa helpers globally (#604)
This commit is contained in:
parent
73cec49cf0
commit
726a581add
4 changed files with 15 additions and 23 deletions
|
@ -1,13 +1,9 @@
|
|||
<script setup>
|
||||
import { pwa } from '~/composables/pwa'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<button
|
||||
v-if="pwa.needRefresh"
|
||||
v-if="$pwa?.needRefresh"
|
||||
bg="fade" relative rounded
|
||||
flex="~ gap-1 center" px3 py1 text-primary
|
||||
@click="pwa.updateServiceWorker()"
|
||||
@click="$pwa.updateServiceWorker()"
|
||||
>
|
||||
<div i-ri-download-cloud-2-line />
|
||||
<h2 flex="~ gap-2" items-center>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue