From bcce3336c3bb1b75f59b750e0242502083d7eac3 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 25 Nov 2024 17:14:48 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=82=AE=E4=BB=B6=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8:=20=E9=BB=98=E8=AE=A4=E6=9C=80=E5=A4=A7=E5=8C=96;=20?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA=E6=8A=84=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DndModal.jsx | 9 +++++---- .../Conversations/Online/Input/EmailEditorPopup.jsx | 10 +++++++--- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/DndModal.jsx b/src/components/DndModal.jsx index 7071729..5112c3f 100644 --- a/src/components/DndModal.jsx +++ b/src/components/DndModal.jsx @@ -51,10 +51,10 @@ const DnDModal = ({ children, open, setOpen, onCancel, onMove, onResize, initial footerClassName='!p-2' className={`!rounded-t !rounded-b-none !border !border-solid !shadow-heavy ${props.rootClassName}`} zIndex={2} - initialWidth={(mobile ? window.innerWidth : (initial.width || 680))} // window.innerWidth < 680 - initialHeight={(mobile ? window.innerHeight : (initial.height || 600))} // window.innerHeight < 700 - initialTop={mobile ? 0 : (initial.top || 74)} - initialLeft={mobile ? 0 : (initial.left || (window.innerWidth - 700))} + initialWidth={(mobile ? window.innerWidth : (initial.width ?? 680))} // window.innerWidth < 680 + initialHeight={(mobile ? window.innerHeight : (initial.height ?? 600))} // window.innerHeight < 700 + initialTop={mobile ? 0 : (initial.top ?? 74)} + initialLeft={mobile ? 0 : (initial.left ?? (window.innerWidth - 700))} title={title} minimizeButton={<>} onMove={onHandleMove} @@ -63,6 +63,7 @@ const DnDModal = ({ children, open, setOpen, onCancel, onMove, onResize, initial // onOk={onHandleOk} onStageChange={onStageChange} footer={footer} + {...props} {...(mobile ? { maximizeButton: <> } : {})}> <>{children} diff --git a/src/views/Conversations/Online/Input/EmailEditorPopup.jsx b/src/views/Conversations/Online/Input/EmailEditorPopup.jsx index 1dfb649..56861e2 100644 --- a/src/views/Conversations/Online/Input/EmailEditorPopup.jsx +++ b/src/views/Conversations/Online/Input/EmailEditorPopup.jsx @@ -143,7 +143,7 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, toEmail, convers const [htmlContent, setHtmlContent] = useState(''); const [textContent, setTextContent] = useState(''); - const [showCc, setShowCc] = useState(false); + const [showCc, setShowCc] = useState(true); const [showBcc, setShowBcc] = useState(false); const handleShowCc = () => { setShowCc(true); @@ -174,7 +174,8 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, toEmail, convers return () => {}; } const { info, } = mailData - setShowCc(!isEmpty(mailData.info?.MAI_CS)); + // setShowCc(!isEmpty(mailData.info?.MAI_CS)); + setShowCc(true); const preQuoteBody = generateQuoteContent(mailData); @@ -372,7 +373,10 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, toEmail, convers rootClassName='email-editor-wrapper !border-indigo-300 ' open={open} setOpen={setOpen} - initial={{ top: isEmpty(quoteid) ? 20 : 74 }} + // initial={{ top: isEmpty(quoteid) ? 20 : 74 }} + initial={{ width: window.innerWidth-40, height: window.innerHeight-40, left: 20, top: 20 }} + maximizeButton={<>} + initialStage={'FULLSCREEN'} onCancel={() => { form.resetFields(); }}