diff options
| author | Fuwn <[email protected]> | 2024-01-12 20:43:40 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-12 20:43:40 -0800 |
| commit | f4e1e2206d2d148ea51370ef33c2de336719004e (patch) | |
| tree | 72bc6b0ee6399c404edefa2e5c07a8ea3cafb76a /src/lib/Notification/Notification.svelte | |
| parent | feat(manga): refresh notification (diff) | |
| download | due.moe-f4e1e2206d2d148ea51370ef33c2de336719004e.tar.xz due.moe-f4e1e2206d2d148ea51370ef33c2de336719004e.zip | |
feat(settings): disable notifications option
Diffstat (limited to 'src/lib/Notification/Notification.svelte')
| -rw-r--r-- | src/lib/Notification/Notification.svelte | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/src/lib/Notification/Notification.svelte b/src/lib/Notification/Notification.svelte index f5e172a7..87f51c76 100644 --- a/src/lib/Notification/Notification.svelte +++ b/src/lib/Notification/Notification.svelte @@ -1,4 +1,5 @@ <script lang="ts"> + import settings from '$stores/settings'; import { onMount } from 'svelte'; export let notification: { [key: string]: any } = {}; @@ -16,36 +17,38 @@ }; </script> -<div - id="notification-container" - class={removed ? 'fade-out' : 'fade-in'} - on:click={remove} - on:keydown={() => { - return; - }} - role="button" - tabindex="0" -> - {#if notification.description} - <!-- svelte-ignore a11y-no-noninteractive-element-interactions --> - <details - open - id="notification" - on:click|preventDefault={(event) => event.preventDefault()} - on:keydown={() => { - return; - }} - > - <summary>{@html notification.heading}</summary> +{#if !$settings.displayDisableNotifications} + <div + id="notification-container" + class={removed ? 'fade-out' : 'fade-in'} + on:click={remove} + on:keydown={() => { + return; + }} + role="button" + tabindex="0" + > + {#if notification.description} + <!-- svelte-ignore a11y-no-noninteractive-element-interactions --> + <details + open + id="notification" + on:click|preventDefault={(event) => event.preventDefault()} + on:keydown={() => { + return; + }} + > + <summary>{@html notification.heading}</summary> - {@html notification.description} - </details> - {:else} - <div class="card" id="notification"> - {@html notification.heading} - </div> - {/if} -</div> + {@html notification.description} + </details> + {:else} + <div class="card" id="notification"> + {@html notification.heading} + </div> + {/if} + </div> +{/if} <style> #notification-container { |