mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-05 00:47:48 +08:00
Merge pull request #192 from AAEE86/master
refactor(usage): 移除时间线中的格式转换标签展示
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>
|
||||||
|
|||||||
@@ -101,12 +101,6 @@
|
|||||||
class="node-line"
|
class="node-line"
|
||||||
:class="{ 'conversion-boundary': groupIndex + 1 === conversionBoundaryIndex }"
|
:class="{ 'conversion-boundary': groupIndex + 1 === conversionBoundaryIndex }"
|
||||||
/>
|
/>
|
||||||
<span
|
|
||||||
v-if="groupIndex + 1 === conversionBoundaryIndex"
|
|
||||||
class="boundary-label"
|
|
||||||
>
|
|
||||||
格式转换
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -200,10 +194,6 @@
|
|||||||
<span class="info-label">格式</span>
|
<span class="info-label">格式</span>
|
||||||
<span class="info-value">
|
<span class="info-value">
|
||||||
<code class="format-code">{{ formatApiFormat(currentAttempt.extra_data.provider_api_format) }}</code>
|
<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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -1272,27 +1262,6 @@ const getStatusColorClass = (status: string) => {
|
|||||||
border-top: 2px dashed hsl(var(--muted-foreground) / 0.4);
|
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 {
|
.detail-panel {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user