diff --git a/web/public/cover-4.webp b/web/public/cover-4.webp new file mode 100644 index 00000000..0e9ecbf0 Binary files /dev/null and b/web/public/cover-4.webp differ diff --git a/web/src/components/settings/personal/components/UserInfoHeader.js b/web/src/components/settings/personal/components/UserInfoHeader.js index 9a1b10db..4ecbc68e 100644 --- a/web/src/components/settings/personal/components/UserInfoHeader.js +++ b/web/src/components/settings/personal/components/UserInfoHeader.js @@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com */ import React from 'react'; -import { Avatar, Card, Tag, Divider, Typography } from '@douyinfe/semi-ui'; +import { Avatar, Card, Tag, Divider, Typography, Badge } from '@douyinfe/semi-ui'; import { isRoot, isAdmin, renderQuota, stringToColor } from '../../../../helpers'; import { Coins, BarChart2, Users } from 'lucide-react'; @@ -35,137 +35,143 @@ const UserInfoHeader = ({ t, userState }) => { const getAvatarText = () => { const username = getUsername(); if (username && username.length > 0) { - // 获取前两个字符,支持中文和英文 return username.slice(0, 2).toUpperCase(); } return 'NA'; }; return ( - -
-
-
- - {getAvatarText()} - -
-
- {getUsername()} -
-
- {isRoot() ? ( - - {t('超级管理员')} - - ) : isAdmin() ? ( - - {t('管理员')} - - ) : ( - - {t('普通用户')} - - )} - + {/* 用户信息内容 */} +
+
+
+ - ID: {userState?.user?.id} - + {getAvatarText()} + +
+
{getUsername()}
+
+ {isRoot() ? ( + + {t('超级管理员')} + + ) : isAdmin() ? ( + + {t('管理员')} + + ) : ( + + {t('普通用户')} + + )} + + ID: {userState?.user?.id} + +
+
- - {/* 右上角统计信息(Semi UI 卡片) */} -
- -
-
- -
- {t('历史消耗')} -
{renderQuota(userState?.user?.used_quota)}
-
-
- -
- -
- {t('请求次数')} -
{userState.user?.request_count || 0}
-
-
- -
- -
- {t('用户分组')} -
{userState?.user?.group || t('默认')}
-
-
-
-
-
- -
-
- {t('当前余额')} -
-
+ } + > + {/* 当前余额和桌面版统计信息 */} +
+ {/* 当前余额显示 */} + +
{renderQuota(userState?.user?.quota)}
-
+ - {/* 移动端统计信息卡片(仅 xs 可见) */} -
- -
-
-
- - {t('历史消耗')} -
-
{renderQuota(userState?.user?.used_quota)}
+ {/* 桌面版统计信息(Semi UI 卡片) */} +
+ +
+
+ + {t('历史消耗')} + {renderQuota(userState?.user?.used_quota)}
- -
-
- - {t('请求次数')} -
-
{userState.user?.request_count || 0}
+ +
+ + {t('请求次数')} + {userState.user?.request_count || 0}
- -
-
- - {t('用户分组')} -
-
{userState?.user?.group || t('默认')}
+ +
+ + {t('用户分组')} + {userState?.user?.group || t('默认')}
+ + {/* 移动端和中等屏幕统计信息卡片 */} +
+ +
+
+
+ + {t('历史消耗')} +
+ {renderQuota(userState?.user?.used_quota)} +
+ +
+
+ + {t('请求次数')} +
+ {userState.user?.request_count || 0} +
+ +
+
+ + {t('用户分组')} +
+ {userState?.user?.group || t('默认')} +
+
+
+
); };