feat(frontend): 标明 OpenAI 认证模式

This commit is contained in:
cat
2026-07-14 19:25:13 +08:00
parent ec7c1b6f72
commit 6485081122
6 changed files with 50 additions and 13 deletions
@@ -234,6 +234,7 @@
<div class="flex min-w-0 flex-col gap-1">
<div class="flex flex-wrap items-center gap-1">
<PlatformTypeBadge :platform="row.platform" :type="row.type"
:auth-mode="getOpenAIAuthMode(row)"
:plan-type="getAccountPlanType(row)"
:privacy-mode="row.extra?.privacy_mode || row.parent_privacy_mode"
:subscription-expires-at="row.credentials?.subscription_expires_at || row.parent_subscription_expires_at" />
@@ -1167,6 +1168,12 @@ function getAccountPlanType(row: any): string | undefined {
return row.credentials?.plan_type || row.parent_plan_type || undefined
}
function getOpenAIAuthMode(row: any): string | undefined {
if (!row || row.platform !== 'openai' || row.type !== 'oauth') return undefined
const authMode = row.credentials?.auth_mode
return typeof authMode === 'string' && authMode.trim() ? authMode : undefined
}
// Antigravity 订阅等级辅助函数
function getAntigravityTierFromRow(row: any): string | null {
if (row.platform !== 'antigravity') return null