+
{data?.status !== 'deleted' ? (
= ({
preFix={preFix}
className="link-secondary"
/>
+ {updateTime > 0 && (
+ <>
+ •
+
+ >
+ )}
) : (
-
+ <>
+
+ {updateTime > 0 && (
+ <>
+ •
+
+ >
+ )}
+ >
))}
diff --git a/ui/src/index.scss b/ui/src/index.scss
index fb1e06a7..e3153fd2 100644
--- a/ui/src/index.scss
+++ b/ui/src/index.scss
@@ -422,3 +422,7 @@ img[src=''] {
display: none;
line-height: 1;
}
+
+.inherit {
+ color: inherit !important;
+}
diff --git a/ui/src/pages/Questions/Detail/components/Answer/index.tsx b/ui/src/pages/Questions/Detail/components/Answer/index.tsx
index 825f698d..957a60df 100644
--- a/ui/src/pages/Questions/Detail/components/Answer/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Answer/index.tsx
@@ -20,7 +20,7 @@
import { memo, FC, useEffect, useRef } from 'react';
import { Button, Alert, Badge } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
-import { Link, useSearchParams } from 'react-router-dom';
+import { useSearchParams } from 'react-router-dom';
import {
Actions,
@@ -28,7 +28,6 @@ import {
UserCard,
Icon,
Comment,
- FormatTime,
htmlRender,
ImgViewer,
} from '@/components';
@@ -110,22 +109,34 @@ const Index: FC
= ({
{t('post_pending', { keyPrefix: 'messages' })}
)}
-
- {data?.accepted === 2 && (
-
-
-
- Best answer
-
+
+
+
- )}
+
+ {data?.accepted === 2 && (
+
+
+
+ Best answer
+
+
+ )}
+
-
+
-
-
-
-
-
- {data.update_user_info &&
- data.update_user_info?.username !== data.user_info?.username ? (
-
- ) : isLogged ? (
-
-
-
- ) : (
-
- )}
-
-
-
-
-
-
+ commentId={String(searchParams.get('commentId'))}>
+
+
);
};
diff --git a/ui/src/pages/Questions/Detail/components/Question/index.tsx b/ui/src/pages/Questions/Detail/components/Question/index.tsx
index 93134578..19b73b06 100644
--- a/ui/src/pages/Questions/Detail/components/Question/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Question/index.tsx
@@ -26,7 +26,7 @@ import {
Tag,
Actions,
Operate,
- UserCard,
+ BaseUserCard,
Comment,
FormatTime,
htmlRender,
@@ -40,11 +40,10 @@ import { pathFactory } from '@/router/pathFactory';
interface Props {
data: any;
hasAnswer: boolean;
- isLogged: boolean;
initPage: (type: string) => void;
}
-const Index: FC
= ({ data, initPage, hasAnswer, isLogged }) => {
+const Index: FC = ({ data, initPage, hasAnswer }) => {
const { t } = useTranslation('translation', {
keyPrefix: 'question_detail',
});
@@ -90,7 +89,7 @@ const Index: FC = ({ data, initPage, hasAnswer, isLogged }) => {
return (
-
+
= ({ data, initPage, hasAnswer, isLogged }) => {
-
+
+
+
+
{data?.view_count > 0 && (
{t('Views')} {formatCount(data.view_count)}
@@ -131,18 +133,20 @@ const Index: FC
= ({ data, initPage, hasAnswer, isLogged }) => {
+
+
+
+
+
{data?.tags?.map((item: any) => {
return ;
})}
-
-
-
= ({ data, initPage, hasAnswer, isLogged }) => {
}}
/>
-
-
+
+
= ({ data, initPage, hasAnswer, isLogged }) => {
isAccepted={Boolean(data?.accepted_answer_id)}
callback={initPage}
/>
-
-
- {data.update_user_info &&
- data.update_user_info?.username !== data.user_info?.username ? (
-
- ) : isLogged ? (
-
-
-
- ) : (
-
- )}
-
-
-
-
+
-
-
);
};
diff --git a/ui/src/pages/Questions/Detail/components/Reactions/index.tsx b/ui/src/pages/Questions/Detail/components/Reactions/index.tsx
index 9c747cf8..9386b94c 100644
--- a/ui/src/pages/Questions/Detail/components/Reactions/index.tsx
+++ b/ui/src/pages/Questions/Detail/components/Reactions/index.tsx
@@ -21,8 +21,6 @@ import { FC, memo, useEffect, useState } from 'react';
import { Button, OverlayTrigger, Popover, Tooltip } from 'react-bootstrap';
import { useTranslation } from 'react-i18next';
-import classNames from 'classnames';
-
import { Icon } from '@/components';
import { queryReactions, updateReaction } from '@/services';
import { tryNormalLogged } from '@/utils/guard';
@@ -111,10 +109,7 @@ const Index: FC = ({
);
return (
-
+
{showAddCommentBtn && (