aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Notification
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/Notification
parentfeat(manga): refresh notification (diff)
downloaddue.moe-f4e1e2206d2d148ea51370ef33c2de336719004e.tar.xz
due.moe-f4e1e2206d2d148ea51370ef33c2de336719004e.zip
feat(settings): disable notifications option
Diffstat (limited to 'src/lib/Notification')
-rw-r--r--src/lib/Notification/Notification.svelte61
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 {