From 003a7b354a279620086f57cfdef7b175164d99c5 Mon Sep 17 00:00:00 2001 From: alma Date: Mon, 28 Apr 2025 10:46:08 +0200 Subject: [PATCH] courrier multi account restore compose --- components/email/ComposeEmail.tsx | 208 ++++++++++++++++-------------- 1 file changed, 111 insertions(+), 97 deletions(-) diff --git a/components/email/ComposeEmail.tsx b/components/email/ComposeEmail.tsx index 9764feb8..5af7cc38 100644 --- a/components/email/ComposeEmail.tsx +++ b/components/email/ComposeEmail.tsx @@ -359,118 +359,132 @@ export default function ComposeEmail(props: ComposeEmailAllProps) { }, []); return ( -
- -
-
- {/* To Field */} -
- - setTo(e.target.value)} - placeholder="recipient@example.com" - className="w-full mt-1 bg-white border-gray-300 text-gray-900" - /> -
+
+
+ {/* Modal Header */} +
+

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

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

Attachments

+
+ {attachments.map((file, index) => ( +
+ {file.name} + +
+ ))} +
+
+ )} +
{/* Modal Footer */}