feat: add pwa install button (#27)

* feat: add pwa tooltip

* feat: add pwa install button
This commit is contained in:
云游君
2022-04-30 20:39:24 +08:00
committed by GitHub
parent 50156534c2
commit 2712616683
9 changed files with 154 additions and 68 deletions

12
src/stores/app.ts Normal file
View File

@@ -0,0 +1,12 @@
import { acceptHMRUpdate, defineStore } from 'pinia'
export const useAppStore = defineStore('app', () => {
const deferredPrompt = ref<Event | any>()
return {
deferredPrompt,
}
})
if (import.meta.hot)
import.meta.hot.accept(acceptHMRUpdate(useAppStore, import.meta.hot))