From ee22f64621af95f239908789d1efd83a878cc0e0 Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 16 Apr 2025 18:59:29 +0200 Subject: [PATCH] Neah version mail design fix 6 --- app/mail/page.tsx | 83 ++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 47 deletions(-) diff --git a/app/mail/page.tsx b/app/mail/page.tsx index b549163..5d5c5ca 100644 --- a/app/mail/page.tsx +++ b/app/mail/page.tsx @@ -739,32 +739,32 @@ export default function MailPage() { // Update the email list header with better aligned checkbox and bulk actions const renderEmailListHeader = () => ( -
-
+
+ {/* Main header row */} +
-
{/* Match height with email list items */} - 0 && selectedEmails.length === emails.length} - onCheckedChange={toggleSelectAll} - className="ml-1" - /> -
-

+ 0 && selectedEmails.length === emails.length} + onCheckedChange={toggleSelectAll} + className="mt-0.5" + /> +

{currentView === 'INBOX' ? 'Inbox' : currentView === 'starred' ? 'Starred' : currentView.charAt(0).toUpperCase() + currentView.slice(1).toLowerCase()}

- - {emails.length} emails -

- + + {emails.length} emails + + + {/* Bulk actions aligned to the right */} {selectedEmails.length > 0 && ( -
+
)} @@ -824,36 +821,28 @@ export default function MailPage() { const renderEmailListItem = (email: Email) => (
handleEmailSelect(email.id)} > -
{/* Match height with header */} - { - const e = { target: { checked }, stopPropagation: () => {} } as React.ChangeEvent; - handleEmailCheckbox(e, email.id); - }} - onClick={(e) => e.stopPropagation()} - className="ml-1" - /> -
+ { + const e = { target: { checked }, stopPropagation: () => {} } as React.ChangeEvent; + handleEmailCheckbox(e, email.id); + }} + onClick={(e) => e.stopPropagation()} + className="mt-0.5" + />
-
+
{currentView === 'Sent' ? email.to : ( (() => { - // Check if email is in format "name " const fromMatch = email.from.match(/^([^<]+)\s*<([^>]+)>$/); - if (fromMatch) { - // If we have both name and email, return just the name - return fromMatch[1].trim(); - } - // If it's just an email address, return the full email - return email.from; + return fromMatch ? fromMatch[1].trim() : email.from; })() )}