diff --git a/src/lib/components/Notifications.svelte b/src/lib/components/Notifications.svelte index 37cf746..4488952 100644 --- a/src/lib/components/Notifications.svelte +++ b/src/lib/components/Notifications.svelte @@ -14,6 +14,9 @@ import { createKind24Reply, getKind24RelaySet } from "$lib/utils/kind24_utils"; import RelayDisplay from "$lib/components/RelayDisplay.svelte"; import RelayInfoList from "$lib/components/RelayInfoList.svelte"; + import { Modal, Button } from "flowbite-svelte"; + import { searchProfiles } from "$lib/utils/search_utility"; + import type { NostrProfile } from "$lib/utils/search_types"; const { event } = $props<{ event: NDKEvent }>(); @@ -570,7 +573,7 @@ {#if loading} -
+
Loading {notificationMode === "public-messages" ? "public messages" : "notifications"}... @@ -586,9 +589,9 @@

No public messages found.

{:else} -
+
{#if filteredByUser} -
+
Filtered by user: {authorProfiles.get(filteredByUser)?.displayName || authorProfiles.get(filteredByUser)?.name || `${filteredByUser.slice(0, 8)}...${filteredByUser.slice(-4)}`} @@ -602,11 +605,11 @@
{/if} -
+
{#each filteredMessages.slice(0, 100) as message} {@const authorProfile = authorProfiles.get(message.pubkey)} {@const isFromUser = message.pubkey === $userStore.pubkey} -
+
@@ -752,11 +755,11 @@
{/if}
- {/each} + {/each}
{#if filteredMessages.length > 20} -
+
Showing 20 of {filteredMessages.length} messages {filteredByUser ? `(filtered)` : ''}. Scroll to see more.
{/if} @@ -768,11 +771,10 @@

No notifications {notificationMode === "to-me" ? "received" : "sent"} found.

{:else} -
-
- {#each notifications.slice(0, 100) as notification} - {@const authorProfile = authorProfiles.get(notification.pubkey)} -
+
+ {#each notifications.slice(0, 100) as notification} + {@const authorProfile = authorProfiles.get(notification.pubkey)} +
@@ -831,12 +833,11 @@
-
- {/each} -
+
+ {/each} {#if notifications.length > 100} -
+
Showing 100 of {notifications.length} notifications {notificationMode === "to-me" ? "received" : "sent"}. Scroll to see more.
{/if}