refactor: Simplify PersonalSetting component layout
- Moved footer content from the Card component to a separate Descriptions component for better structure. - Maintained the display of user quota, historical consumption, and request count while improving readability.
This commit is contained in:
@@ -363,36 +363,18 @@ const PersonalSetting = () => {
|
|||||||
</Space>
|
</Space>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
footer={
|
|
||||||
<Descriptions row>
|
|
||||||
<Descriptions.Item itemKey='当前余额'>
|
|
||||||
{renderQuota(userState?.user?.quota)}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item itemKey='历史消耗'>
|
|
||||||
{renderQuota(userState?.user?.used_quota)}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item itemKey='请求次数'>
|
|
||||||
{userState.user?.request_count}
|
|
||||||
</Descriptions.Item>
|
|
||||||
</Descriptions>
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<Typography.Title heading={6}>可用模型</Typography.Title>
|
<Descriptions row>
|
||||||
<div style={{marginTop: 10}}>
|
<Descriptions.Item itemKey='当前余额'>
|
||||||
<Space wrap>
|
{renderQuota(userState?.user?.quota)}
|
||||||
{models.map((model) => (
|
</Descriptions.Item>
|
||||||
<Tag
|
<Descriptions.Item itemKey='历史消耗'>
|
||||||
key={model}
|
{renderQuota(userState?.user?.used_quota)}
|
||||||
color='cyan'
|
</Descriptions.Item>
|
||||||
onClick={() => {
|
<Descriptions.Item itemKey='请求次数'>
|
||||||
copyText(model);
|
{userState.user?.request_count}
|
||||||
}}
|
</Descriptions.Item>
|
||||||
>
|
</Descriptions>
|
||||||
{model}
|
|
||||||
</Tag>
|
|
||||||
))}
|
|
||||||
</Space>
|
|
||||||
</div>
|
|
||||||
</Card>
|
</Card>
|
||||||
<Card
|
<Card
|
||||||
style={{marginTop: 10}}
|
style={{marginTop: 10}}
|
||||||
|
|||||||
Reference in New Issue
Block a user