fix(frontend): correct provider key total

This commit is contained in:
elky
2026-09-06 00:10:27 +08:00
parent d1cb0ebecf
commit c125e78c5f
2 changed files with 6 additions and 1 deletions
@@ -731,7 +731,7 @@
v-if="shouldPaginateKeys"
class="px-4 py-2 flex items-center justify-between text-xs text-muted-foreground mt-auto"
>
<span>{{ legacyT('共') }} {{ allKeys.length }} {{ legacyT('个') }}{{ legacyT(isKeyManagedProviderType(provider.provider_type) ? '密钥' : '账号') }}</span>
<span>{{ legacyT('共') }} {{ providerKeysTotal }} {{ legacyT('个') }}{{ legacyT(isKeyManagedProviderType(provider.provider_type) ? '密钥' : '账号') }}</span>
<div class="flex items-center gap-1.5">
<Button
variant="ghost"
@@ -42,6 +42,11 @@ describe('ProviderDetailDrawer loading priorities', () => {
expect(source).not.toContain(':loading="loadingProviderEndpoints || loadingProviderKeys || loadingProviderModels || loadingProviderMappingPreview"')
})
it('shows the provider-wide key total in the paginated footer', () => {
expect(source).toContain("{{ legacyT('共') }} {{ providerKeysTotal }}")
expect(source).not.toContain("{{ legacyT('共') }} {{ allKeys.length }}")
})
it('does not mount closed child dialogs or blur the page behind the drawer', () => {
expect(source).toContain('class="absolute inset-0 bg-black/30"')
expect(source).not.toContain('backdrop-blur-sm')