From 80b8eb62fb9d0fdbc63e0f71b8516d3c2c9a2b45 Mon Sep 17 00:00:00 2001 From: Adrien Hopkins Date: Tue, 23 Dec 2025 19:55:53 -0500 Subject: Add individual DMs to DM page --- src/routes/(app)/dm/+page.svelte | 201 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 195 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/routes/(app)/dm/+page.svelte b/src/routes/(app)/dm/+page.svelte index 280b63d3..cffc611e 100644 --- a/src/routes/(app)/dm/+page.svelte +++ b/src/routes/(app)/dm/+page.svelte @@ -1,14 +1,22 @@ @@ -153,7 +312,7 @@

Chats

{#each chats as c} - {/each} @@ -164,7 +323,37 @@ >{$t("dm.header")} {#if selectedChat} -

You are talking to {selectedChat.name}.

+

{selectedChat.username || nostrUserInfo.name} + {nostrUserInfo.nip05 || selectedChat.pubkey.substring(0, 16)} +

+ +
+ {#each dates as day} +

{formatDate(new Date(day * 86400 * 1000))}

+
    + {#each messageRumours.get(day) as rumour} + {#if rumour.pubkey === user.pubkey && pTagKeys(rumour).includes(selectedChat.pubkey)} +
  • {rumour.content} {TIME.format(new Date(rumour.created_at * 1000))}
  • + {:else if rumour.pubkey === selectedChat.pubkey && pTagKeys(rumour).includes(user.pubkey)} +
  • {rumour.content} {TIME.format(new Date(rumour.created_at * 1000))}
  • + {/if} + {/each} +
+ {/each} +
+ + + sendMessage(text)}> + {#if relayWarningShown} +

{$t("dm.noRelaysSet")} {$t("dm.nostrSettingsLink")}

+ {/if} + + + : . +

{$t("dm.fadedWarning")}

+ {#if canSend && !canSendExpiring} +

{$t("dm.cantSendExpiring").replace("[R]", selectedChat.username)}

+ {/if} {/if}
-- cgit v1.2.3