From a309f9f897e31efc646a796beb33daa71aa7597c Mon Sep 17 00:00:00 2001 From: dashuai Date: Fri, 15 Mar 2024 10:40:19 +0800 Subject: [PATCH] Feat/1.3.0/UI (#848) --- i18n/en_US.yaml | 1 + ui/src/pages/Admin/Answers/index.tsx | 48 +++++++++---------- .../Ask/components/SearchQuestion/index.tsx | 21 +++++--- 3 files changed, 37 insertions(+), 33 deletions(-) diff --git a/i18n/en_US.yaml b/i18n/en_US.yaml index debe3dbc..7bbbe748 100644 --- a/i18n/en_US.yaml +++ b/i18n/en_US.yaml @@ -1071,6 +1071,7 @@ ui: asked: asked update: Modified edit: edited + commented: commented Views: Viewed Follow: Follow Following: Following diff --git a/ui/src/pages/Admin/Answers/index.tsx b/ui/src/pages/Admin/Answers/index.tsx index a653f7f5..091fe2db 100644 --- a/ui/src/pages/Admin/Answers/index.tsx +++ b/ui/src/pages/Admin/Answers/index.tsx @@ -110,32 +110,28 @@ const Answers: FC = () => { return ( - - - - {li.question_info.title} - {li.accepted === 2 && ( - - )} - - -
- {escapeRemove(li.description)} -
-
+ + {li.question_info.title} + + {li.accepted === 2 && ( + + )} +
+ {escapeRemove(li.description)} +
{li.vote_count} diff --git a/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx b/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx index 2f79305b..96b2b0ac 100644 --- a/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx +++ b/ui/src/pages/Questions/Ask/components/SearchQuestion/index.tsx @@ -46,17 +46,24 @@ const SearchQuestion = ({ similarQuestions }) => { - {item.title} - {item.status === 'closed' - ? ` [${t('closed', { keyPrefix: 'question' })}]` - : null} + 0 + ? 'me-3' + : '' + }`}> + {item.title} + {item.status === 'closed' + ? ` [${t('closed', { keyPrefix: 'question' })}] ` + : null} + {item.accepted_answer ? ( - + {t('x_answers', { @@ -67,7 +74,7 @@ const SearchQuestion = ({ similarQuestions }) => { ) : ( item.answer_count > 0 && ( - + {t('x_answers', {