diff options
| author | Fuwn <[email protected]> | 2024-01-11 18:45:31 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-11 18:45:31 -0800 |
| commit | 1b71b6a1197967271528fd0d5b9ff5fc9a1f3c26 (patch) | |
| tree | 5261f5d00e22b53e89420c3c1b5fa97d60253d6e /src/routes | |
| parent | refactor(routes): move shortcuts to hooks (diff) | |
| download | due.moe-1b71b6a1197967271528fd0d5b9ff5fc9a1f3c26.tar.xz due.moe-1b71b6a1197967271528fd0d5b9ff5fc9a1f3c26.zip | |
feat: notifications
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/+layout.svelte | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index e1df9c9d..52d1b8ba 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -10,6 +10,8 @@ import { fly } from 'svelte/transition'; import { readable, type Readable } from 'svelte/store'; import { navigating } from '$app/stores'; + import Notifications from 'svelte-notifications'; + import Notification from '$lib/Notification/Notification.svelte'; export let data; @@ -99,18 +101,20 @@ <p /> - {#key data.url} - <div - in:fly={{ - x: way, - duration: animationDelay, - delay: animationDelay - }} - out:fly={{ x: -way, duration: animationDelay }} - > - <slot /> - </div> - {/key} + <Notifications item={Notification} zIndex={5000}> + {#key data.url} + <div + in:fly={{ + x: way, + duration: animationDelay, + delay: animationDelay + }} + out:fly={{ x: -way, duration: animationDelay }} + > + <slot /> + </div> + {/key} + </Notifications> </div> <style> |