mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
feat: 统一供应商凭据标签并优化统计展示布局
This commit is contained in:
@@ -179,7 +179,7 @@
|
|||||||
端点 {{ provider.active_endpoints }}/{{ provider.total_endpoints }}
|
端点 {{ provider.active_endpoints }}/{{ provider.total_endpoints }}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-muted-foreground">
|
<span class="text-muted-foreground">
|
||||||
{{ provider.provider_type && provider.provider_type !== 'custom' ? '账号' : '密钥' }} {{ provider.active_keys }}/{{ provider.total_keys }}
|
{{ getCredentialLabel(provider) }} {{ provider.active_keys }}/{{ provider.total_keys }}
|
||||||
</span>
|
</span>
|
||||||
<span class="text-muted-foreground">
|
<span class="text-muted-foreground">
|
||||||
模型 {{ provider.active_models }}/{{ provider.total_models }}
|
模型 {{ provider.active_models }}/{{ provider.total_models }}
|
||||||
@@ -302,4 +302,9 @@ function handleDescriptionKeydown(event: KeyboardEvent) {
|
|||||||
handleCancel(event)
|
handleCancel(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCredentialLabel(provider: ProviderWithEndpointsSummary): '账号' | '密钥' {
|
||||||
|
const providerType = String(provider.provider_type || '').trim().toLowerCase()
|
||||||
|
return providerType && providerType !== 'custom' ? '账号' : '密钥'
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -78,22 +78,18 @@
|
|||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell class="py-3.5 text-center">
|
<TableCell class="py-3.5 text-center">
|
||||||
<div class="space-y-0.5 text-xs">
|
<div class="inline-grid grid-cols-[1.75rem_1.75rem_1.75rem] gap-x-0.5 gap-y-0.5 text-xs text-left">
|
||||||
<div class="flex items-center justify-center gap-1.5">
|
<span class="text-muted-foreground/70">端点:</span>
|
||||||
<span class="text-muted-foreground/70">端点:</span>
|
<span class="font-medium text-foreground/90 tabular-nums text-right">{{ provider.active_endpoints }}</span>
|
||||||
<span class="font-medium text-foreground/90">{{ provider.active_endpoints }}</span>
|
<span class="text-muted-foreground/50 tabular-nums">/{{ provider.total_endpoints }}</span>
|
||||||
<span class="text-muted-foreground/50">/{{ provider.total_endpoints }}</span>
|
|
||||||
</div>
|
<span class="text-muted-foreground/70">{{ `${getCredentialLabel(provider)}:` }}</span>
|
||||||
<div class="flex items-center justify-center gap-1.5">
|
<span class="font-medium text-foreground/90 tabular-nums text-right">{{ provider.active_keys }}</span>
|
||||||
<span class="text-muted-foreground/70">密钥:</span>
|
<span class="text-muted-foreground/50 tabular-nums">/{{ provider.total_keys }}</span>
|
||||||
<span class="font-medium text-foreground/90">{{ provider.active_keys }}</span>
|
|
||||||
<span class="text-muted-foreground/50">/{{ provider.total_keys }}</span>
|
<span class="text-muted-foreground/70">模型:</span>
|
||||||
</div>
|
<span class="font-medium text-foreground/90 tabular-nums text-right">{{ provider.active_models }}</span>
|
||||||
<div class="flex items-center justify-center gap-1.5">
|
<span class="text-muted-foreground/50 tabular-nums">/{{ provider.total_models }}</span>
|
||||||
<span class="text-muted-foreground/70">模型:</span>
|
|
||||||
<span class="font-medium text-foreground/90">{{ provider.active_models }}</span>
|
|
||||||
<span class="text-muted-foreground/50">/{{ provider.total_models }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell class="py-3.5 align-middle">
|
<TableCell class="py-3.5 align-middle">
|
||||||
@@ -285,4 +281,9 @@ function handleDescriptionKeydown(event: KeyboardEvent) {
|
|||||||
handleCancel(event)
|
handleCancel(event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCredentialLabel(provider: ProviderWithEndpointsSummary): '账号' | '密钥' {
|
||||||
|
const providerType = String(provider.provider_type || '').trim().toLowerCase()
|
||||||
|
return providerType && providerType !== 'custom' ? '账号' : '密钥'
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user