aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/lib/svelte
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/lib/svelte/Navigation.svelte20
-rw-r--r--app/src/lib/svelte/ReloadPrompt.svelte60
2 files changed, 39 insertions, 41 deletions
diff --git a/app/src/lib/svelte/Navigation.svelte b/app/src/lib/svelte/Navigation.svelte
index 9246c28..fa9182f 100644
--- a/app/src/lib/svelte/Navigation.svelte
+++ b/app/src/lib/svelte/Navigation.svelte
@@ -1,22 +1,22 @@
<script lang="ts">
- import { page } from '$app/stores';
+ import { page } from '$app/stores'
- import Icon from '@iconify/svelte';
- import homeIcon from '@iconify/icons-carbon/home';
- import logoGithub from '@iconify/icons-carbon/logo-github';
- import menuIcon from '@iconify/icons-carbon/menu';
- import pageBreak from '@iconify/icons-carbon/page-break';
+ import Icon from '@iconify/svelte'
+ import homeIcon from '@iconify/icons-carbon/home'
+ import logoGithub from '@iconify/icons-carbon/logo-github'
+ import menuIcon from '@iconify/icons-carbon/menu'
+ import pageBreak from '@iconify/icons-carbon/page-break'
- import { AppRail, AppRailAnchor, getDrawerStore } from '@skeletonlabs/skeleton';
+ import { AppRail, AppRailAnchor, getDrawerStore } from '@skeletonlabs/skeleton'
- const drawerStore = getDrawerStore();
+ const drawerStore = getDrawerStore()
function drawerClose(): void {
- drawerStore.close();
+ drawerStore.close()
}
// Hamburgers
- export let menu = false;
+ export let menu = false
</script>
<AppRail>
diff --git a/app/src/lib/svelte/ReloadPrompt.svelte b/app/src/lib/svelte/ReloadPrompt.svelte
index d54a202..e6effbb 100644
--- a/app/src/lib/svelte/ReloadPrompt.svelte
+++ b/app/src/lib/svelte/ReloadPrompt.svelte
@@ -1,34 +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)
- }
- })
-</script> \ No newline at end of file
+ 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>