|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { useEffect, useState } from 'react';
|
|
|
|
|
import { App, Button, Popover, Tabs, List, Image, Avatar, Card, Flex, Space } from 'antd';
|
|
|
|
|
import { App, Button, Popover, Tabs, List, Image, Avatar, Card, Flex, Space,Typography } from 'antd';
|
|
|
|
|
import { FileSearchOutlined, LoadingOutlined } from '@ant-design/icons';
|
|
|
|
|
import { RotateLeftOutlined, RotateRightOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons'
|
|
|
|
|
import { InboxIcon, SendPlaneFillIcon } from '@/components/Icons';
|
|
|
|
@ -13,6 +13,7 @@ import useStyleStore from '@/stores/StyleStore';
|
|
|
|
|
import useAuthStore from '@/stores/AuthStore';
|
|
|
|
|
import { sentMsgTypeMapped } from '@/channel/bubbleMsgUtils';
|
|
|
|
|
import { v4 as uuid } from 'uuid';
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
|
|
const BIG_PAGE_SIZE = MESSAGE_PAGE_SIZE * 10;
|
|
|
|
|
|
|
|
|
@ -337,28 +338,25 @@ const MessageListFilter = ({ ...props }) => {
|
|
|
|
|
renderItem={({ msgtext, ...item }) => (
|
|
|
|
|
<List.Item
|
|
|
|
|
// actions={[item.localDate]}
|
|
|
|
|
className='cursor-pointer'
|
|
|
|
|
className='cursor-pointer !py-1'
|
|
|
|
|
onClick={() => {
|
|
|
|
|
onOpenEmail({ msgtext, ...item });
|
|
|
|
|
setOpenPopup(false);
|
|
|
|
|
// setOpenPopup(false);
|
|
|
|
|
}}>
|
|
|
|
|
<List.Item.Meta
|
|
|
|
|
avatar={
|
|
|
|
|
item.sender === 'me' ? <SendPlaneFillIcon className='text-primary' /> : <InboxIcon className='text-indigo-500' />
|
|
|
|
|
// <Avatar size='small' style={CalColorStyle(item.senderName)}>
|
|
|
|
|
// {item.senderName.substring(0, 3)}
|
|
|
|
|
// </Avatar>
|
|
|
|
|
}
|
|
|
|
|
title={msgtext?.email?.subject}
|
|
|
|
|
// description={`To: ${msgtext.to}`}
|
|
|
|
|
description={
|
|
|
|
|
<Flex justify={'space-between'} className='max-w-full overflow-hidden'>
|
|
|
|
|
<div className='flex-auto line-clamp-1 break-all pr-2'>{`To: ${msgtext.to}`}</div>
|
|
|
|
|
<div className=' basis-32 flex-grow-0 flex-shrink-0'>{item.localDate}</div>
|
|
|
|
|
</Flex>
|
|
|
|
|
}
|
|
|
|
|
/>
|
|
|
|
|
{msgtext?.email?.abstract}
|
|
|
|
|
<Flex vertical={false} wrap={false} className='w-full'>
|
|
|
|
|
<div className='flex-auto ml-auto min-w-40 line-clamp-2'>
|
|
|
|
|
{item.sender !== 'me' ? <InboxIcon className='text-indigo-500' /> : <SendPlaneFillIcon className='text-primary' />}
|
|
|
|
|
{/* <Tooltip title={emailItem.MAI_Subject}> */}
|
|
|
|
|
<Typography.Text>{msgtext?.email?.subject}</Typography.Text>
|
|
|
|
|
{/* </Tooltip> */}
|
|
|
|
|
</div>
|
|
|
|
|
<div className='ml-1 max-w-40'>
|
|
|
|
|
<Typography.Text ellipsis={{ tooltip: msgtext.to }}>{msgtext.to.replaceAll('"', '')}</Typography.Text>
|
|
|
|
|
</div>
|
|
|
|
|
<div className='ml-1 max-w-20'>
|
|
|
|
|
<Typography.Text ellipsis={{ tooltip: item.localDate }}>{dayjs(item.localDate).format('MM-DD HH:mm')}</Typography.Text>
|
|
|
|
|
</div>
|
|
|
|
|
</Flex>
|
|
|
|
|
</List.Item>
|
|
|
|
|
)}
|
|
|
|
|
/>
|
|
|
|
@ -369,7 +367,7 @@ const MessageListFilter = ({ ...props }) => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Popover
|
|
|
|
|
<Popover zIndex={3}
|
|
|
|
|
// destroyTooltipOnHide
|
|
|
|
|
placement='bottom'
|
|
|
|
|
overlayClassName={[mobile === false ? 'w-2/5' : 'w-full max-h-full', 'max-h-[70%]'].join(' ')}
|
|
|
|
|