This is an automated email from the ASF dual-hosted git repository. shuai pushed a commit to branch ui-optimization in repository https://gitbox.apache.org/repos/asf/answer.git
commit ab35a9d47fdd24ca78a6c101010fc36e94ed49a1 Author: shuai <[email protected]> AuthorDate: Fri Mar 21 11:14:08 2025 +0800 fix: List avatar size optimization, Views color rule optimization --- ui/src/components/BaseUserCard/index.tsx | 2 +- ui/src/components/Counts/index.tsx | 4 ++-- ui/src/pages/Admin/Answers/index.tsx | 6 +++++- ui/src/pages/Admin/Questions/index.tsx | 6 +++++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ui/src/components/BaseUserCard/index.tsx b/ui/src/components/BaseUserCard/index.tsx index 488e3f17..f171bc2c 100644 --- a/ui/src/components/BaseUserCard/index.tsx +++ b/ui/src/components/BaseUserCard/index.tsx @@ -38,7 +38,7 @@ const Index: FC<Props> = ({ data, showAvatar = true, avatarClass = '', - avatarSize = '20px', + avatarSize = '24px', className = 'small', avatarSearchStr = 's=48', showReputation = true, diff --git a/ui/src/components/Counts/index.tsx b/ui/src/components/Counts/index.tsx index ade4fc51..ef172377 100644 --- a/ui/src/components/Counts/index.tsx +++ b/ui/src/components/Counts/index.tsx @@ -86,9 +86,9 @@ const Index: FC<Props> = ({ 'summary-stat ms-3 flex-shrink-0', data.views >= 100 * 1000 ? 'view-level3' - : data.views >= 1000 + : data.views >= 10000 ? 'view-level2' - : data.views >= 100 + : data.views >= 1000 ? 'view-level1' : '', )}> diff --git a/ui/src/pages/Admin/Answers/index.tsx b/ui/src/pages/Admin/Answers/index.tsx index 96598734..9f8e3cde 100644 --- a/ui/src/pages/Admin/Answers/index.tsx +++ b/ui/src/pages/Admin/Answers/index.tsx @@ -166,7 +166,11 @@ const Answers: FC = () => { <td>{li.vote_count}</td> <td> <Stack> - <BaseUserCard data={li.user_info} nameMaxWidth="200px" /> + <BaseUserCard + avatarSize="20" + data={li.user_info} + nameMaxWidth="200px" + /> <FormatTime className="small text-secondary" diff --git a/ui/src/pages/Admin/Questions/index.tsx b/ui/src/pages/Admin/Questions/index.tsx index e0456c2b..58dd0559 100644 --- a/ui/src/pages/Admin/Questions/index.tsx +++ b/ui/src/pages/Admin/Questions/index.tsx @@ -165,7 +165,11 @@ const Questions: FC = () => { </td> <td> <Stack> - <BaseUserCard data={li.user_info} nameMaxWidth="130px" /> + <BaseUserCard + avatarSize="20" + data={li.user_info} + nameMaxWidth="130px" + /> <FormatTime className="small text-secondary" time={li.create_time}
