|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
|
import { App, ConfigProvider, Button, Form, Input, Flex, Checkbox, Popconfirm, Select, Space, Upload, Divider } from 'antd';
|
|
|
|
|
import { App, ConfigProvider, Drawer, Button, Form, Input, Flex, Checkbox, Popconfirm, Select, Space, Upload, Divider } from 'antd';
|
|
|
|
|
import { UploadOutlined } from '@ant-design/icons';
|
|
|
|
|
import '@dckj/react-better-modal/dist/index.css';
|
|
|
|
|
import DnDModal from '@/components/DndModal';
|
|
|
|
@ -15,6 +15,7 @@ import './EmailEditor.css';
|
|
|
|
|
import { postSendEmail } from '@/actions/EmailActions';
|
|
|
|
|
import { sentMsgTypeMapped, } from '@/channel/bubbleMsgUtils';
|
|
|
|
|
import { useEmailDetail } from '@/hooks/useEmail';
|
|
|
|
|
import useSnippetStore from '@/stores/SnippetStore'
|
|
|
|
|
|
|
|
|
|
const getAbstract = (longtext) => {
|
|
|
|
|
const lines = longtext.split('\n');
|
|
|
|
@ -271,6 +272,9 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, conversationid,
|
|
|
|
|
setSendLoading(false);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [openDrawer] = useSnippetStore((state) => [state.openDrawer])
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<ConfigProvider theme={{ token: { colorPrimary: '#6366f1' } }}>
|
|
|
|
@ -372,7 +376,7 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, conversationid,
|
|
|
|
|
<Flex align={'center'} className='absolute right-0'>
|
|
|
|
|
{/* todo: 添加图文集、支付链接 */}
|
|
|
|
|
<Divider type='vertical' />
|
|
|
|
|
<Button type={'link'}>图文集</Button>
|
|
|
|
|
<Button type={'link'} onClick={() => openDrawer()}>图文集</Button>
|
|
|
|
|
<Button type={'link'}>支付链接</Button>
|
|
|
|
|
{/* 更多工具 */}
|
|
|
|
|
{/* <Popover
|
|
|
|
@ -395,6 +399,7 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, conversationid,
|
|
|
|
|
</Form>
|
|
|
|
|
<LexicalEditor {...{ isRichText }} onChange={handleEditorChange} initialValue={initialContent} />
|
|
|
|
|
</DnDModal>
|
|
|
|
|
|
|
|
|
|
</ConfigProvider>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|