From 81a107147c3c306b999390927f44ea4be3242c95 Mon Sep 17 00:00:00 2001 From: alma Date: Wed, 30 Apr 2025 23:01:36 +0200 Subject: [PATCH] courrier preview --- components/email/EmailDetailView.tsx | 128 +++++++++++++++++---------- 1 file changed, 79 insertions(+), 49 deletions(-) diff --git a/components/email/EmailDetailView.tsx b/components/email/EmailDetailView.tsx index 25c61f74..afb1ef28 100644 --- a/components/email/EmailDetailView.tsx +++ b/components/email/EmailDetailView.tsx @@ -89,7 +89,7 @@ export default function EmailDetailView({ }; return ( - <> +
{/* Email actions header */}
@@ -147,57 +147,87 @@ export default function EmailDetailView({
- {/* Scrollable content area */} - -
- - - {(email.from?.[0]?.name || '').charAt(0) || (email.from?.[0]?.address || '').charAt(0) || '?'} - - -
-

- {email.from?.[0]?.name || ''} <{email.from?.[0]?.address || ''}> -

-

- to {email.to?.[0]?.address || ''} -

- {email.cc && email.cc.length > 0 && ( -

- cc {email.cc.map(c => c.address).join(', ')} + {/* Scrollable content area - enhanced for better scrolling */} + +

+ {/* Email header info */} +
+ + + {(email.from?.[0]?.name || '').charAt(0) || (email.from?.[0]?.address || '').charAt(0) || '?'} + + +
+

+ {email.from?.[0]?.name || ''} <{email.from?.[0]?.address || ''}>

- )} -
-
- {formatDate(email.date)} -
-
- - {/* Email content */} -
- {renderEmailContent()} -
- - {/* Attachments (if any) */} - {email.hasAttachments && email.attachments && email.attachments.length > 0 && ( -
-

Attachments

-
- {email.attachments.map((attachment, idx) => ( -
-
-

{attachment.filename}

-

{(attachment.size / 1024).toFixed(1)} KB

-
-
- ))} +

+ to {email.to?.[0]?.address || ''} +

+ {email.cc && email.cc.length > 0 && ( +

+ cc {email.cc.map(c => c.address).join(', ')} +

+ )} +
+
+ {formatDate(email.date)}
- )} + + {/* Email content with improved scrolling */} +
+ {renderEmailContent()} +
+ + {/* Attachments (if any) */} + {email.hasAttachments && email.attachments && email.attachments.length > 0 && ( +
+

Attachments

+
+ {email.attachments.map((attachment, idx) => ( +
+
+

{attachment.filename}

+

{(attachment.size / 1024).toFixed(1)} KB

+
+
+ ))} +
+
+ )} +
- + + {/* Add CSS for better email content display */} + +
); } \ No newline at end of file