From c67c5256e6bb7601dce753fb40fa247c5e991550 Mon Sep 17 00:00:00 2001 From: James Xylight Date: Wed, 19 Mar 2025 19:13:35 -0700 Subject: [PATCH] fix: limit inbox notification count, close #505 --- src/lib/components/ui/navbar/Profile.svelte | 2 +- src/lib/components/ui/sidebar/Sidebar.svelte | 4 ++-- src/routes/admin/+layout.svelte | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/components/ui/navbar/Profile.svelte b/src/lib/components/ui/navbar/Profile.svelte index a696d08b..5d5572be 100644 --- a/src/lib/components/ui/navbar/Profile.svelte +++ b/src/lib/components/ui/navbar/Profile.svelte @@ -112,7 +112,7 @@ {$t('profile.inbox')} {#if $notifications.inbox > 0} - {$notifications.inbox} + {$notifications.inbox > 99 ? '∞' : $notifications.inbox} {/if} diff --git a/src/lib/components/ui/sidebar/Sidebar.svelte b/src/lib/components/ui/sidebar/Sidebar.svelte index eeb7743a..cc763d8e 100644 --- a/src/lib/components/ui/sidebar/Sidebar.svelte +++ b/src/lib/components/ui/sidebar/Sidebar.svelte @@ -47,10 +47,10 @@ {$t('profile.inbox')} {#if $notifications.inbox} - {$notifications.inbox} + {$notifications.inbox > 99 ? '∞' : $notifications.inbox} {/if} diff --git a/src/routes/admin/+layout.svelte b/src/routes/admin/+layout.svelte index 3b6a2cd9..72baada0 100644 --- a/src/routes/admin/+layout.svelte +++ b/src/routes/admin/+layout.svelte @@ -16,7 +16,7 @@ {#if $notifications.applications > 0} - {$notifications.applications} + {$notifications.applications > 99 ? '∞' : $notifications.applications} unread applications {/if}