diff --git a/src/message.tsx b/src/message.tsx index 36b1790..369374b 100644 --- a/src/message.tsx +++ b/src/message.tsx @@ -12,10 +12,11 @@ export default function Message(props: Props) { const { chatStore, messageIndex, setChatStore } = props; const chat = chatStore.history[messageIndex]; const [showEdit, setShowEdit] = useState(false); + const [showCopiedHint, setShowCopiedHint] = useState(false); const DeleteIcon = () => ( ); + const CopiedHint = () => ( + + Message Copied to clipboard! + + ); + + const CopyIcon = () => { + return ( + <> + + + ); + }; + return ( <> {chatStore.postBeginIndex !== 0 && @@ -62,13 +92,15 @@ export default function Message(props: Props) { : "bg-green-400" } ${chat.hide ? "opacity-50" : ""}`} > -

+

{chat.hide ? chat.content.split("\n")[0].slice(0, 16) + "... (deleted)" : chat.content}

+ + {showCopiedHint && } {chatStore.develop_mode && (
token{" "}