From fd846d41ea2ee58e868653ab181226988d0efbef Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 16 Dec 2024 11:49:57 -0800 Subject: [PATCH] Further refine notifications --- src/app/components/MenuSpacesItem.svelte | 4 ++-- src/app/components/PrimaryNav.svelte | 7 ++++-- src/app/notifications.ts | 24 +++++++-------------- src/app/requests.ts | 7 +++--- src/routes/spaces/[relay]/+page.svelte | 27 ++++++++++++++++++++---- 5 files changed, 42 insertions(+), 27 deletions(-) diff --git a/src/app/components/MenuSpacesItem.svelte b/src/app/components/MenuSpacesItem.svelte index 9eba280f..1e0099fe 100644 --- a/src/app/components/MenuSpacesItem.svelte +++ b/src/app/components/MenuSpacesItem.svelte @@ -5,7 +5,7 @@ import RelayName from "@app/components/RelayName.svelte" import RelayDescription from "@app/components/RelayDescription.svelte" import {makeSpacePath} from "@app/routes" - import {inactiveNotifications} from "@app/notifications" + import {notifications} from "@app/notifications" export let url @@ -17,7 +17,7 @@
- {#if $inactiveNotifications.has(path)} + {#if $notifications.has(path)}
{/if}
diff --git a/src/app/components/PrimaryNav.svelte b/src/app/components/PrimaryNav.svelte index 8dcab4c0..252e5309 100644 --- a/src/app/components/PrimaryNav.svelte +++ b/src/app/components/PrimaryNav.svelte @@ -1,4 +1,5 @@
- - Threads + + +
+ Threads + {#if $notifications.has(threadsPath)} +
+ {/if} +
{#each $userRooms as room (room)} - + {@const roomPath = makeRoomPath(url, room)} + {#if channelIsLocked($channelsById.get(makeChannelId(url, room)))} {:else} {/if} - +
+ + {#if $notifications.has(roomPath)} +
+ {/if} +
{/each} {#each $otherRooms as room (room)}