mail page fix design
This commit is contained in:
parent
cfd984d0aa
commit
d3e57d44a4
@ -1413,10 +1413,6 @@ export default function CourrierPage() {
|
|||||||
const handleReply = (type: 'reply' | 'reply-all' | 'forward') => {
|
const handleReply = (type: 'reply' | 'reply-all' | 'forward') => {
|
||||||
if (!selectedEmail) return;
|
if (!selectedEmail) return;
|
||||||
|
|
||||||
// Phase 1: Format the original email content
|
|
||||||
const originalContent = getReplyBody(selectedEmail, type);
|
|
||||||
|
|
||||||
// Phase 2: Set up the composition interface
|
|
||||||
const getReplyTo = () => {
|
const getReplyTo = () => {
|
||||||
if (type === 'forward') return '';
|
if (type === 'forward') return '';
|
||||||
return selectedEmail.from;
|
return selectedEmail.from;
|
||||||
@ -1435,11 +1431,14 @@ export default function CourrierPage() {
|
|||||||
return subject.startsWith('Re:') ? subject : `Re: ${subject}`;
|
return subject.startsWith('Re:') ? subject : `Re: ${subject}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Get the formatted original email content
|
||||||
|
const originalContent = getReplyBody(selectedEmail, type);
|
||||||
|
|
||||||
// Update the compose form with the reply content
|
// Update the compose form with the reply content
|
||||||
setComposeTo(getReplyTo());
|
setComposeTo(getReplyTo());
|
||||||
setComposeCc(getReplyCc());
|
setComposeCc(getReplyCc());
|
||||||
setComposeSubject(getReplySubject());
|
setComposeSubject(getReplySubject());
|
||||||
setComposeBody(''); // Start with empty body for new content
|
setComposeBody(originalContent); // Set the formatted content instead of empty string
|
||||||
setComposeBcc('');
|
setComposeBcc('');
|
||||||
|
|
||||||
// Show the compose form and CC field for Reply All
|
// Show the compose form and CC field for Reply All
|
||||||
@ -1447,12 +1446,6 @@ export default function CourrierPage() {
|
|||||||
setShowCc(type === 'reply-all');
|
setShowCc(type === 'reply-all');
|
||||||
setShowBcc(false);
|
setShowBcc(false);
|
||||||
setAttachments([]);
|
setAttachments([]);
|
||||||
|
|
||||||
// Pass the formatted original email content to the compose modal
|
|
||||||
setOriginalEmail({
|
|
||||||
content: originalContent,
|
|
||||||
type
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the confirmation dialog component
|
// Add the confirmation dialog component
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user