From be0519496f708f886a998441298d0cae3ff99b02 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 6 Nov 2025 16:56:47 +0530 Subject: [PATCH 1/2] feat(messages): Enhance dark mode UI for messaging interface - Implement dark mode color scheme for messages page - Add gradient backgrounds for header and new message button - Improve contrast and readability with dark theme colors - Update conversation list with dark mode styling - Enhance empty state UI with dark theme elements - Refactor color palette to support dark mode aesthetic - Improve visual hierarchy and interaction states for dark mode --- app/protected/messages/page.tsx | 31 ++++++++++++++---------- components/messages/ConversationList.tsx | 27 ++++++++++++--------- components/messages/ConversationView.tsx | 22 ++++++++++------- components/messages/MessageBubble.tsx | 8 +++--- components/messages/MessageInput.tsx | 8 +++--- components/messages/TypingIndicator.tsx | 8 +++--- 6 files changed, 59 insertions(+), 45 deletions(-) diff --git a/app/protected/messages/page.tsx b/app/protected/messages/page.tsx index 5e7c9a00..43d4ff9e 100644 --- a/app/protected/messages/page.tsx +++ b/app/protected/messages/page.tsx @@ -53,15 +53,20 @@ export default function MessagesPage() { : 'Unknown' return ( -
+
{/* Header */} -
+
- -

Messages

+
+ +
+

Messages

- -

{conversationName}

+

{conversationName}

{!selectedConversation.is_group && selectedConversation.other_user && selectedConversation.other_user.id ? ( - -

No conversations yet

-

+

+ +
+

No conversations yet

+

Start a new conversation to get started

@@ -87,13 +89,13 @@ export function ConversationList({ conversations, selectedId, onSelect, loading key={conversation.id} onClick={() => onSelect(conversation.id)} className={cn( - 'w-full flex items-center gap-3 p-3 rounded-lg transition-colors text-left', - 'hover:bg-muted', - isSelected && 'bg-muted' + 'w-full flex items-center gap-3 p-3 rounded-lg transition-all text-left', + 'hover:bg-zinc-900', + isSelected && 'bg-zinc-900 border border-zinc-800' )} >
- + {avatarUrl && } {initials} @@ -111,11 +113,14 @@ export function ConversationList({ conversations, selectedId, onSelect, loading
- 0 && 'text-primary')}> + 0 ? 'text-blue-400' : 'text-white' + )}> {name} {conversation.last_message_at && ( - + {formatDistanceToNow(new Date(conversation.last_message_at), { addSuffix: true })} )} @@ -123,12 +128,12 @@ export function ConversationList({ conversations, selectedId, onSelect, loading

0 ? 'font-medium text-foreground' : 'text-muted-foreground' + conversation.unread_count > 0 ? 'font-medium text-zinc-300' : 'text-zinc-500' )}> {conversation.last_message_content || 'No messages yet'}

{conversation.unread_count > 0 && ( - + {conversation.unread_count} )} diff --git a/components/messages/ConversationView.tsx b/components/messages/ConversationView.tsx index a3ec3ff5..f7579925 100644 --- a/components/messages/ConversationView.tsx +++ b/components/messages/ConversationView.tsx @@ -28,10 +28,12 @@ export function ConversationView({ conversationId }: ConversationViewProps) { if (!conversationId) { return ( -
- -

Select a conversation

-

+

+
+ +
+

Select a conversation

+

Choose a conversation from the list to start messaging

@@ -57,14 +59,16 @@ export function ConversationView({ conversationId }: ConversationViewProps) { } return ( -
+
{/* Messages Area */}
{messages.length === 0 ? (
- -

No messages yet

-

+

+ +
+

No messages yet

+

Send a message to start the conversation

@@ -88,7 +92,7 @@ export function ConversationView({ conversationId }: ConversationViewProps) { )} {/* Message Input */} -
+
{!isOwn && ( - + {getName()} )}
@@ -59,7 +59,7 @@ export function MessageBubble({ message, isOwn }: MessageBubbleProps) { )}
- + {formatDistanceToNow(new Date(message.created_at), { addSuffix: true })}
diff --git a/components/messages/MessageInput.tsx b/components/messages/MessageInput.tsx index 566f274c..aaec729c 100644 --- a/components/messages/MessageInput.tsx +++ b/components/messages/MessageInput.tsx @@ -90,7 +90,7 @@ export function MessageInput({ onSend, disabled, placeholder = 'Type a message.. }, [content, isTyping, onTyping]) return ( -
+