aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Root.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-12 20:43:40 -0800
committerFuwn <[email protected]>2024-01-12 20:43:40 -0800
commitf4e1e2206d2d148ea51370ef33c2de336719004e (patch)
tree72bc6b0ee6399c404edefa2e5c07a8ea3cafb76a /src/lib/Root.svelte
parentfeat(manga): refresh notification (diff)
downloaddue.moe-f4e1e2206d2d148ea51370ef33c2de336719004e.tar.xz
due.moe-f4e1e2206d2d148ea51370ef33c2de336719004e.zip
feat(settings): disable notifications option
Diffstat (limited to 'src/lib/Root.svelte')
-rw-r--r--src/lib/Root.svelte26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/Root.svelte b/src/lib/Root.svelte
new file mode 100644
index 00000000..d65a9832
--- /dev/null
+++ b/src/lib/Root.svelte
@@ -0,0 +1,26 @@
+<script lang="ts">
+ import settings from '$stores/settings';
+ import { fly } from 'svelte/transition';
+
+ export let data: any;
+ export let way: number;
+
+ const animationDelay = 100;
+</script>
+
+{#if $settings.displayDisableAnimations}
+ <slot />
+{:else}
+ {#key data.url}
+ <div
+ in:fly={{
+ x: way,
+ duration: animationDelay,
+ delay: animationDelay
+ }}
+ out:fly={{ x: -way, duration: animationDelay }}
+ >
+ <slot />
+ </div>
+ {/key}
+{/if}