aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/svelte/ReloadPrompt.svelte
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2023-10-20 14:08:54 -0500
committerMatt Strapp <matt@mattstrapp.net>2023-10-20 14:08:54 -0500
commit85b69ea89fbd08c3019f32b57a284337b6555cad (patch)
tree03674ba1400b42d0ce3bde4f6a058503d8a5647b /app/src/lib/svelte/ReloadPrompt.svelte
parentBump svelte from 4.2.1 to 4.2.2 (diff)
downloadtrinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.tar
trinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.tar.gz
trinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.tar.bz2
trinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.tar.lz
trinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.tar.xz
trinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.tar.zst
trinkets-85b69ea89fbd08c3019f32b57a284337b6555cad.zip
uh
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'app/src/lib/svelte/ReloadPrompt.svelte')
-rw-r--r--app/src/lib/svelte/ReloadPrompt.svelte32
1 files changed, 0 insertions, 32 deletions
diff --git a/app/src/lib/svelte/ReloadPrompt.svelte b/app/src/lib/svelte/ReloadPrompt.svelte
deleted file mode 100644
index e6effbb..0000000
--- a/app/src/lib/svelte/ReloadPrompt.svelte
+++ /dev/null
@@ -1,32 +0,0 @@
-<script lang="ts">
- import { getToastStore } from '@skeletonlabs/skeleton'
- import { useRegisterSW } from 'virtual:pwa-register/svelte'
-
- const toastStore = getToastStore()
-
- const { updateServiceWorker } = useRegisterSW({
- onRegisteredSW(r) {
- console.log('SW Registered: ', r)
- },
- onNeedRefresh() {
- toastStore.trigger({
- message: 'A new version of the application is available.',
- autohide: false,
- action: {
- label: 'Refresh',
- response: updateServiceWorker,
- },
- })
- },
- onOfflineReady() {
- toastStore.trigger({
- background: 'variant-filled-success',
- message: 'Now ready for offline use!',
- timeout: 5000,
- })
- },
- onRegisterError(err) {
- console.error('SW Registration Error: ', err)
- },
- })
-</script>