feat: 统一供应商凭据标签并优化统计展示布局

This commit is contained in:
AAEE86
2026-02-28 10:09:51 +08:00
parent 423eb95f7a
commit daecdb7676
2 changed files with 23 additions and 17 deletions
@@ -179,7 +179,7 @@
端点 {{ provider.active_endpoints }}/{{ provider.total_endpoints }}
</span>
<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 class="text-muted-foreground">
模型 {{ provider.active_models }}/{{ provider.total_models }}
@@ -302,4 +302,9 @@ function handleDescriptionKeydown(event: KeyboardEvent) {
handleCancel(event)
}
}
function getCredentialLabel(provider: ProviderWithEndpointsSummary): '账号' | '密钥' {
const providerType = String(provider.provider_type || '').trim().toLowerCase()
return providerType && providerType !== 'custom' ? '账号' : '密钥'
}
</script>