diff --git a/client/src/components/Chat.jsx b/client/src/components/Chat.jsx index 965c7f5c..64797a95 100644 --- a/client/src/components/Chat.jsx +++ b/client/src/components/Chat.jsx @@ -329,6 +329,18 @@ const Chat = () => { setEditing({ isediting: true, messageID: id }); }; + const handleQuoteReply = (id) => { + inputRef.current.focus(); + + const { message } = getMessage(id); + if (message.includes('Warning Message')) { + cancelEdit(); + return; + } + inputRef.current.value = `${message} --> `; + + }; + const handleTypingStatus = debounce((e) => { if (e.target.value.length > 0) { socket @@ -365,6 +377,15 @@ const Chat = () => { ); }; + const renderIconButtonReceiver = (props) => { + return ( + + ); + }; + return (
@@ -395,7 +416,7 @@ const Chat = () => { : 'other' }`} > -
+
{ status !== 'pending' && ( { > - handleDelete(id) + handleEdit(id) } > - Delete + Edit + - handleEdit(id) + handleCopyToClipBoard( + id + ) } > - Edit + Copy + + + handleQuoteReply( + id + ) + } + > + Quote Reply + + handleDelete(id) + } + > + Delete + + + )} + {sender.toString() !== + senderId.toString() && + status !== 'pending' && ( + handleCopyToClipBoard( @@ -442,6 +499,15 @@ const Chat = () => { > Copy + + handleQuoteReply( + id + ) + } + > + Quote Reply + )}
diff --git a/client/src/styles/chat.css b/client/src/styles/chat.css index 76127d33..9d9b3230 100644 --- a/client/src/styles/chat.css +++ b/client/src/styles/chat.css @@ -37,11 +37,11 @@ } .message-block .message .content { - @apply bg-red rounded-[20px] p-[15px] break-all w-full flex gap-2 items-center; + @apply bg-red rounded-[18px] p-[15px] break-all will-change-auto flex gap-2 items-center; } .message-block .message .status { - @apply px-[20px] text-[12px] flex gap-2 items-center; + @apply px-[10px] text-[12px] flex gap-2 items-center; } .message .content h1,