From 1e1258d86555969d2de324732b1f82b96f126eec Mon Sep 17 00:00:00 2001 From: shuai Date: Wed, 23 Aug 2023 15:38:10 +0800 Subject: [PATCH] fix: name max width set 300px --- ui/src/components/BaseUserCard/index.tsx | 10 +++++++--- ui/src/components/Counts/index.tsx | 11 +++++------ ui/src/components/QuestionList/index.tsx | 8 +++----- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ui/src/components/BaseUserCard/index.tsx b/ui/src/components/BaseUserCard/index.tsx index b6575fd9..826f3319 100644 --- a/ui/src/components/BaseUserCard/index.tsx +++ b/ui/src/components/BaseUserCard/index.tsx @@ -24,7 +24,7 @@ const Index: FC = ({ showReputation = true, }) => { return ( -
+
{data?.status !== 'deleted' ? ( {showAvatar && ( @@ -36,7 +36,9 @@ const Index: FC = ({ alt={data?.display_name} /> )} - {data?.display_name} + + {data?.display_name} + ) : ( <> @@ -49,7 +51,9 @@ const Index: FC = ({ alt={data?.display_name} /> )} - {data?.display_name} + + {data?.display_name} + )} diff --git a/ui/src/components/Counts/index.tsx b/ui/src/components/Counts/index.tsx index c32fb6b6..42555bb4 100644 --- a/ui/src/components/Counts/index.tsx +++ b/ui/src/components/Counts/index.tsx @@ -30,10 +30,9 @@ const Index: FC = ({ const { t } = useTranslation('translation', { keyPrefix: 'counts' }); return ( -
+
{showVotes && ( -
+
{data.votes} {t('votes')} @@ -42,7 +41,7 @@ const Index: FC = ({ )} {showAccepted && ( -
+
{t('accepted')}
@@ -50,7 +49,7 @@ const Index: FC = ({ {showAnswers && (
{isAccepted ? ( @@ -64,7 +63,7 @@ const Index: FC = ({
)} {showViews && ( - + {data.views} {t('views')} diff --git a/ui/src/components/QuestionList/index.tsx b/ui/src/components/QuestionList/index.tsx index 4aec418d..bc8c965a 100644 --- a/ui/src/components/QuestionList/index.tsx +++ b/ui/src/components/QuestionList/index.tsx @@ -84,10 +84,8 @@ const QuestionList: FC = ({ {li.status === 2 ? ` [${t('closed')}]` : ''} -
-
+
+
= ({ views: li.view_count, }} isAccepted={li.accepted_answer_id >= 1} - className="justify-content-start-end justify-content-md-end flex-fill" + className="ms-0 ms-md-3 mt-2 mt-md-0" />