diff --git a/src/common/component/Message/Reply.tsx b/src/common/component/Message/Reply.tsx index dfb835f6..3935d6d8 100644 --- a/src/common/component/Message/Reply.tsx +++ b/src/common/component/Message/Reply.tsx @@ -1,4 +1,5 @@ import React, { MouseEvent, FC } from "react"; +import clsx from "clsx"; import MarkdownRender from "../MarkdownRender"; import { ContentTypes } from "../../../app/config"; import { getFileIcon, isImage } from "../../utils"; @@ -62,10 +63,14 @@ const Reply: FC = ({ mid, interactive = true }) => { const { mid } = evt.currentTarget.dataset; const msgEle = document.querySelector(`[data-msg-mid='${mid}']`); if (msgEle) { - msgEle.dataset.highlight = "true"; + const _class1 = `md:dark:bg-gray-800`; + const _class2 = `md:bg-gray-100`; + msgEle.classList.add(_class1); + msgEle.classList.add(_class2); msgEle.scrollIntoView({ behavior: "smooth", block: "center" }); setTimeout(() => { - msgEle.dataset.highlight = "false"; + msgEle.classList.remove(_class1); + msgEle.classList.remove(_class2); }, 3000); } }; @@ -77,7 +82,9 @@ const Reply: FC = ({ mid, interactive = true }) => {
@@ -90,7 +97,10 @@ const Reply: FC = ({ mid, interactive = true }) => { /> {currUser.name}
-
{renderContent(data)}
+
+ {renderContent(data)} + {interactive &&
} +
); };