Merge pull request #192 from AAEE86/master

refactor(usage): 移除时间线中的格式转换标签展示
This commit is contained in:
fawney19
2026-02-28 14:47:18 +08:00
committed by GitHub
3 changed files with 23 additions and 48 deletions

View File

@@ -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>

View File

@@ -78,22 +78,18 @@
/>
</TableCell>
<TableCell class="py-3.5 text-center">
<div class="space-y-0.5 text-xs">
<div class="flex items-center justify-center gap-1.5">
<span class="text-muted-foreground/70">端点:</span>
<span class="font-medium text-foreground/90">{{ provider.active_endpoints }}</span>
<span class="text-muted-foreground/50">/{{ provider.total_endpoints }}</span>
</div>
<div class="flex items-center justify-center gap-1.5">
<span class="text-muted-foreground/70">密钥:</span>
<span class="font-medium text-foreground/90">{{ provider.active_keys }}</span>
<span class="text-muted-foreground/50">/{{ provider.total_keys }}</span>
</div>
<div class="flex items-center justify-center gap-1.5">
<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 class="inline-grid grid-cols-[1.75rem_1.75rem_1.75rem] gap-x-0.5 gap-y-0.5 text-xs text-left">
<span class="text-muted-foreground/70">端点:</span>
<span class="font-medium text-foreground/90 tabular-nums text-right">{{ provider.active_endpoints }}</span>
<span class="text-muted-foreground/50 tabular-nums">/{{ provider.total_endpoints }}</span>
<span class="text-muted-foreground/70">{{ `${getCredentialLabel(provider)}:` }}</span>
<span class="font-medium text-foreground/90 tabular-nums text-right">{{ provider.active_keys }}</span>
<span class="text-muted-foreground/50 tabular-nums">/{{ provider.total_keys }}</span>
<span class="text-muted-foreground/70">模型:</span>
<span class="font-medium text-foreground/90 tabular-nums text-right">{{ provider.active_models }}</span>
<span class="text-muted-foreground/50 tabular-nums">/{{ provider.total_models }}</span>
</div>
</TableCell>
<TableCell class="py-3.5 align-middle">
@@ -285,4 +281,9 @@ function handleDescriptionKeydown(event: KeyboardEvent) {
handleCancel(event)
}
}
function getCredentialLabel(provider: ProviderWithEndpointsSummary): '账号' | '密钥' {
const providerType = String(provider.provider_type || '').trim().toLowerCase()
return providerType && providerType !== 'custom' ? '账号' : '密钥'
}
</script>

View File

@@ -101,12 +101,6 @@
class="node-line"
:class="{ 'conversion-boundary': groupIndex + 1 === conversionBoundaryIndex }"
/>
<span
v-if="groupIndex + 1 === conversionBoundaryIndex"
class="boundary-label"
>
格式转换
</span>
</div>
</div>
</div>
@@ -200,10 +194,6 @@
<span class="info-label">格式</span>
<span class="info-value">
<code class="format-code">{{ formatApiFormat(currentAttempt.extra_data.provider_api_format) }}</code>
<span
v-if="currentAttempt.extra_data?.needs_conversion"
class="conversion-badge ml-1.5"
>格式转换</span>
</span>
</div>
<div
@@ -1272,27 +1262,6 @@ const getStatusColorClass = (status: string) => {
border-top: 2px dashed hsl(var(--muted-foreground) / 0.4);
}
.boundary-label {
position: absolute;
top: -14px;
font-size: 0.55rem;
color: hsl(var(--muted-foreground) / 0.6);
white-space: nowrap;
}
/* 详情面板中的格式转换标签 */
.conversion-badge {
display: inline-flex;
align-items: center;
padding: 0.1rem 0.4rem;
font-size: 0.65rem;
font-weight: 500;
color: hsl(var(--muted-foreground));
background: hsl(var(--muted) / 0.5);
border: 1px dashed hsl(var(--border));
border-radius: 4px;
}
/* 详情面板 */
.detail-panel {
margin-top: 1rem;