Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: List avatar size optimization, Views color rule optimization

shuaiab35a9d47fdd
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}