From f4e1e2206d2d148ea51370ef33c2de336719004e Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 12 Jan 2024 20:43:40 -0800 Subject: feat(settings): disable notifications option --- src/lib/Notification/Notification.svelte | 61 ++++++++++++++++-------------- src/lib/Root.svelte | 26 +++++++++++++ src/lib/Settings/Categories/Display.svelte | 2 + src/lib/Utility/device.ts | 17 +++++++++ 4 files changed, 77 insertions(+), 29 deletions(-) create mode 100644 src/lib/Root.svelte create mode 100644 src/lib/Utility/device.ts (limited to 'src/lib') 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 @@ -
{ - return; - }} - role="button" - tabindex="0" -> - {#if notification.description} - -
event.preventDefault()} - on:keydown={() => { - return; - }} - > - {@html notification.heading} +{#if !$settings.displayDisableNotifications} +
{ + return; + }} + role="button" + tabindex="0" + > + {#if notification.description} + +
event.preventDefault()} + on:keydown={() => { + return; + }} + > + {@html notification.heading} - {@html notification.description} -
- {:else} -
- {@html notification.heading} -
- {/if} -
+ {@html notification.description} +
+ {:else} +
+ {@html notification.heading} +
+ {/if} +
+{/if}