mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-31 08:25:35 +00:00
feat(frontend): 标明 OpenAI 认证模式
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user