diff --git a/src/lib/msgUtils.js b/src/lib/msgUtils.js index 5abada0..6df2cfe 100644 --- a/src/lib/msgUtils.js +++ b/src/lib/msgUtils.js @@ -142,7 +142,7 @@ export const sentMsgTypeMapped = { contentToRender: (msg) => ({ ...msg, ...mediaMsg.contentToRender(msg), - text: msg?.name || '', + text: (msg?.name || '') + `\n${msg?.text || ''}`, title: msg?.name || '', originText: msg?.name || '', whatsapp_msg_type: 'document', @@ -363,13 +363,13 @@ export const whatsappMsgTypeMapped = { data: (msg) => ({ id: msg.wamid, title: msg.document?.filename || '', - text: msg.document?.caption || msg.document?.filename || '', - data: { uri: msg.document.link, extension: 'PDF', status: { click: false, download: true, loading: 0 } }, + text: (msg.document?.filename || '') + `\n${msg.document?.caption || ''}`, + data: { uri: msg.document.link, status: { click: false, download: true, loading: 0 } }, originText: msg.document?.caption || msg.document?.filename || '', }), renderForReply: (msg) => ({ id: msg.wamid, - message: msg.document?.caption || msg.document?.filename || '', + message: msg.document?.caption || msg.document?.filename || '[文件]', }), }, contacts: { diff --git a/src/views/Conversations/Components/ConversationsList.jsx b/src/views/Conversations/Components/ConversationsList.jsx index 556a82d..276d422 100644 --- a/src/views/Conversations/Components/ConversationsList.jsx +++ b/src/views/Conversations/Components/ConversationsList.jsx @@ -193,7 +193,7 @@ const Conversations = () => { date={item.last_received_time} unread={item.unread_msg_count} className={ - [String(item.sn) === String(currentConversation.sn) ? '__active text-primary border-y-0 border-e-0 border-s-4 border-solid border-whatsapp-bg bg-whatsapp-bg' : '', + [String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '', String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : '' ].join(' ') } diff --git a/src/views/Conversations/Components/Input/MediaUpload.jsx b/src/views/Conversations/Components/Input/MediaUpload.jsx index 0012bf0..04f0b8a 100644 --- a/src/views/Conversations/Components/Input/MediaUpload.jsx +++ b/src/views/Conversations/Components/Input/MediaUpload.jsx @@ -1,4 +1,4 @@ -import { Upload, Button, message } from 'antd'; +import { Upload, Button, message, Tooltip } from 'antd'; import { FileAddOutlined } from '@ant-design/icons'; import { v4 as uuid } from 'uuid'; import { API_HOST } from '@/config'; @@ -78,7 +78,9 @@ const ImageUpload = ({ disabled, invokeUploadFileMessage, invokeSendUploadMessag } }} > +