From 1f2903fc2db7ce75dd79c65198852bb7fdc00b0a Mon Sep 17 00:00:00 2001 From: Jack Kingsman Date: Thu, 12 Mar 2026 00:06:33 -0700 Subject: [PATCH] Add better preview pane and tweak some themes for contrast --- frontend/src/components/ChatHeader.tsx | 81 ++++++++++--------- frontend/src/components/MessageList.tsx | 51 +++++++----- frontend/src/components/Sidebar.tsx | 6 +- .../settings/SettingsLocalSection.tsx | 71 +++++++++++++++- .../src/test/chatHeaderKeyVisibility.test.tsx | 24 +++++- frontend/src/test/messageList.test.tsx | 19 +++++ frontend/src/test/settingsModal.test.tsx | 18 ----- frontend/src/themes.css | 18 +++-- 8 files changed, 202 insertions(+), 86 deletions(-) diff --git a/frontend/src/components/ChatHeader.tsx b/frontend/src/components/ChatHeader.tsx index 327663b..0631b78 100644 --- a/frontend/src/components/ChatHeader.tsx +++ b/frontend/src/components/ChatHeader.tsx @@ -94,15 +94,23 @@ export function ChatHeader({ onSetChannelFloodScopeOverride(conversation.id, nextValue); }; + const handleOpenConversationInfo = () => { + if (conversation.type === 'contact' && onOpenContactInfo) { + onOpenContactInfo(conversation.id); + return; + } + if (conversation.type === 'channel' && onOpenChannelInfo) { + onOpenChannelInfo(conversation.id); + } + }; + return (
{conversation.type === 'contact' && onOpenContactInfo && ( - onOpenContactInfo(conversation.id)} title="View contact info" aria-label={`View info for ${conversation.name}`} @@ -114,42 +122,41 @@ export function ChatHeader({ contactType={contacts.find((c) => c.public_key === conversation.id)?.type} clickable /> - + )} -

{ - if (conversation.type === 'contact' && onOpenContactInfo) { - onOpenContactInfo(conversation.id); - } else if (conversation.type === 'channel' && onOpenChannelInfo) { - onOpenChannelInfo(conversation.id); - } - } - : undefined - } - > - - {conversation.type === 'channel' && - !conversation.name.startsWith('#') && - activeChannel?.is_hashtag - ? '#' - : ''} - {conversation.name} - - {titleClickable && ( -