feat: Add emoji reaction feature and improve reply formatting
- Add emoji-picker-react package - Create EmojiReaction component for quick emoji responses - Replace EmojiHappy icon with interactive EmojiReaction component - Implement emoji selection as structured reply messages - Improve reply HTML formatting with better styling and Persian date - Add contextual information to both emoji reactions and text replies - Update success messages to be more concise
This commit is contained in:
@@ -50,12 +50,25 @@ export const useReply = ({
|
||||
minute: "2-digit",
|
||||
}).format(originalDate);
|
||||
|
||||
const htmlContent =
|
||||
content +
|
||||
"<br /><br />" +
|
||||
`<div dir="rtl">در تاریخ ${persianDate} ${originalMessage.from.name} <${originalMessage.from.address}> نوشت:</div>` +
|
||||
"<br /><br />" +
|
||||
`<div dir="rtl">${html}</div>`;
|
||||
const htmlContent = `
|
||||
<div dir="rtl" style="font-family: 'Irancell', Arial, sans-serif; line-height: 1.6;">
|
||||
<div style="margin-bottom: 10px; padding: 15px;">
|
||||
${content}
|
||||
</div>
|
||||
|
||||
<div style="border-top: 2px solid #e9ecef; padding-top: 10px;">
|
||||
<div style=" font-size: 12px; margin-bottom: 10px; padding: 8px; border-radius: 4px;">
|
||||
در پاسخ به پیام ارسالی در تاریخ ${persianDate}
|
||||
<br />
|
||||
از: ${originalMessage.from.name} <${originalMessage.from.address}>
|
||||
</div>
|
||||
|
||||
<div >
|
||||
${html}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
const replyData: SendEmailDto = {
|
||||
from: { address: userEmail || "sender@example.com" },
|
||||
@@ -73,7 +86,19 @@ export const useReply = ({
|
||||
? originalMessage.subject
|
||||
: `Re: ${originalMessage.subject}`,
|
||||
html: htmlContent,
|
||||
text: content.replace(/<[^>]*>/g, ""),
|
||||
text: `${content.replace(/<[^>]*>/g, "")}
|
||||
|
||||
═══════════════════════════════════════════════════════
|
||||
|
||||
📩 در پاسخ به پیام ارسالی در تاریخ ${persianDate}
|
||||
📧 از: ${originalMessage.from.name} <${originalMessage.from.address}>
|
||||
|
||||
متن پیام اصلی:
|
||||
${
|
||||
originalMessage.text ||
|
||||
originalMessage.html?.join("").replace(/<[^>]*>/g, "") ||
|
||||
""
|
||||
}`,
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user