From a38942f0fd231c5e6afd369064e50357caf34e58 Mon Sep 17 00:00:00 2001 From: alma Date: Sun, 27 Apr 2025 22:39:06 +0200 Subject: [PATCH] courrier multi account restore compose --- components/email/ComposeEmail.tsx | 328 ++++++++++++++---------------- 1 file changed, 155 insertions(+), 173 deletions(-) diff --git a/components/email/ComposeEmail.tsx b/components/email/ComposeEmail.tsx index 1c77745c..242ef1ca 100644 --- a/components/email/ComposeEmail.tsx +++ b/components/email/ComposeEmail.tsx @@ -360,192 +360,174 @@ export default function ComposeEmail(props: ComposeEmailAllProps) { }, []); return ( -
-
- {/* Modal Header */} -
-

- {type === 'reply' ? 'Reply' : type === 'forward' ? 'Forward' : type === 'reply-all' ? 'Reply All' : 'New Message'} -

-
- - {/* Modal Body */} -
-
- {/* To Field */} -
- - setTo(e.target.value)} - placeholder="recipient@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- - {/* CC/BCC Toggle Buttons */} -
- - -
- - {/* CC Field */} - {showCc && ( -
- - setCc(e.target.value)} - placeholder="cc@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- )} - - {/* BCC Field */} - {showBcc && ( -
- - setBcc(e.target.value)} - placeholder="bcc@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- )} - - {/* Subject Field */} -
- - setSubject(e.target.value)} - placeholder="Enter subject" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
- - {/* Message Body */} -
- -
- -
-
- - {/* Attachments */} - {attachments.length > 0 && ( -
-

Attachments

-
- {attachments.map((file, index) => ( -
- {file.name} - -
- ))} -
-
- )} -
-
- - {/* Modal Footer */} -
-
- {/* File Input for Attachments */} - { - if (e.target.files && e.target.files.length > 0) { - handleAttachmentAdd(e.target.files); - } - }} +
+ +
+ {/* Email header fields */} +
+
+ To: + setTo(e.target.value)} + className="flex-1 border-0 shadow-none h-8 focus-visible:ring-0" + placeholder="recipient@example.com" /> - - {sending && Preparing attachment...}
-
-
+ )} + + {showBcc && ( +
+ Bcc: + setBcc(e.target.value)} + className="flex-1 border-0 shadow-none h-8 focus-visible:ring-0" + placeholder="bcc@example.com" + /> +
+ )} + + {/* CC/BCC controls */} +
+ - + + + +
+ +
+ Subject: + setSubject(e.target.value)} + className="flex-1 border-0 shadow-none h-8 focus-visible:ring-0" + placeholder="Subject" + />
+ + {/* Email body editor */} +
+ + {/* Attachments list */} + {attachments.length > 0 && ( +
+
Attachments:
+
+ {attachments.map((attachment, index) => ( +
+ + {attachment.name} + +
+ ))} +
+
+ )} +
+ +
+
+ + +
+ +
);