aboutsummaryrefslogtreecommitdiffstats
path: root/clients/www/src/lib
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--clients/www/src/lib/components/ReloadPrompt.svelte56
1 files changed, 28 insertions, 28 deletions
diff --git a/clients/www/src/lib/components/ReloadPrompt.svelte b/clients/www/src/lib/components/ReloadPrompt.svelte
index e6effbb..6c778b6 100644
--- a/clients/www/src/lib/components/ReloadPrompt.svelte
+++ b/clients/www/src/lib/components/ReloadPrompt.svelte
@@ -1,32 +1,32 @@
<script lang="ts">
- import { getToastStore } from '@skeletonlabs/skeleton'
- import { useRegisterSW } from 'virtual:pwa-register/svelte'
+ import { getToastStore } from '@skeletonlabs/skeleton';
+ import { useRegisterSW } from 'virtual:pwa-register/svelte';
- const toastStore = getToastStore()
+ 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)
- },
- })
+ 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>