mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-19 01:56:37 +08:00
fix: Rename limit to cost and allow for 0 limit
- Rename `额度` column to `费用` - Allow for a quota to be 0. - If the quota is 0, return 'free'
This commit is contained in:
parent
06350ae5a2
commit
268690219e
@ -124,7 +124,11 @@ export function timestamp2string(timestamp) {
|
||||
return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
|
||||
}
|
||||
|
||||
export function calculateQuota(quota, digits = 2) {
|
||||
export function calculateQuota(quota = 0, digits = 2) {
|
||||
if (!quota || quota === 0) {
|
||||
return 'free';
|
||||
}
|
||||
|
||||
let quotaPerUnit = localStorage.getItem('quota_per_unit');
|
||||
quotaPerUnit = parseFloat(quotaPerUnit);
|
||||
|
||||
|
@ -13,7 +13,7 @@ const LogTableHead = ({ userIsAdmin }) => {
|
||||
<TableCell>模型</TableCell>
|
||||
<TableCell>提示</TableCell>
|
||||
<TableCell>补全</TableCell>
|
||||
<TableCell>额度</TableCell>
|
||||
<TableCell>费用</TableCell>
|
||||
<TableCell>详情</TableCell>
|
||||
</TableRow>
|
||||
</TableHead>
|
||||
|
Loading…
Reference in New Issue
Block a user