fix(frontend): 完全统一 Gemini 四种授权方式的显示格式

**统一后的格式:**
- 第一行:授权方式简称 + 用户等级
- 后续行:有限额显示模型进度条+统计数据+窗口时间,无限额显示「无限流」

**四种授权方式:**
1. **AI Studio OAuth**
   - 第一行:「AI Studio」
   - 后续:「无限流」

2. **GCP Code Assist OAuth** (原 CLI)
   - 第一行:「GCP Free/Pro/Ultra」
   - 后续:Pro/Flash 进度条 + 统计数据(0 req 0 /bin/zsh.00)+ 窗口时间

3. **Google One OAuth** (原 G1)
   - 第一行:「Google One Personal/Free/Pro/...」
   - 后续:「无限流」

4. **API Key** (原 Gemini)
   - 第一行:「Client」
   - 后续:「无限流」或「限流 XX」

**修改内容:**
- AccountUsageCell.vue: 标签改名(CLI→GCP,G1→Google One),模型标签简化(Pro/Flash),保留统计数据
- AccountQuotaInfo.vue: 标签改名(Gemini→Client)
This commit is contained in:
IanShaw027
2026-01-04 10:38:57 +08:00
parent 552118eb7f
commit 482bc289bf
2 changed files with 8 additions and 10 deletions

View File

@@ -90,8 +90,8 @@ const tierLabel = computed(() => {
return tierMap[creds?.tier_id || ''] || 'Personal'
}
// AI Studio 或其他
return 'Gemini'
// API Key: 显示 Client
return 'Client'
})
// Tier Badge 样式

View File

@@ -245,20 +245,18 @@
<div v-else-if="isGeminiCodeAssist && geminiUsageAvailable" class="space-y-1">
<UsageProgressBar
v-if="usageInfo?.gemini_pro_daily"
:label="t('admin.accounts.usageWindow.geminiProDaily')"
label="Pro"
:utilization="usageInfo.gemini_pro_daily.utilization"
:resets-at="usageInfo.gemini_pro_daily.resets_at"
:window-stats="usageInfo.gemini_pro_daily.window_stats"
:stats-title="t('admin.accounts.usageWindow.statsTitleDaily')"
color="indigo"
/>
<UsageProgressBar
v-if="usageInfo?.gemini_flash_daily"
:label="t('admin.accounts.usageWindow.geminiFlashDaily')"
label="Flash"
:utilization="usageInfo.gemini_flash_daily.utilization"
:resets-at="usageInfo.gemini_flash_daily.resets_at"
:window-stats="usageInfo.gemini_flash_daily.window_stats"
:stats-title="t('admin.accounts.usageWindow.statsTitleDaily')"
color="emerald"
/>
<p class="mt-1 text-[9px] leading-tight text-gray-400 dark:text-gray-500 italic">
@@ -587,7 +585,7 @@ const geminiAuthTypeLabel = computed(() => {
if (props.account.type !== 'oauth') return null
if (oauthType === 'google_one') {
// Google One: show "G1" + tier
// Google One: show "Google One" + tier
const tierMap: Record<string, string> = {
AI_PREMIUM: 'AI Premium',
GOOGLE_ONE_STANDARD: 'Standard',
@@ -597,16 +595,16 @@ const geminiAuthTypeLabel = computed(() => {
GOOGLE_ONE_UNLIMITED: 'Unlimited'
}
const tierLabel = geminiTier.value ? tierMap[geminiTier.value] || 'Personal' : 'Personal'
return `G1 ${tierLabel}`
return `Google One ${tierLabel}`
} else if (oauthType === 'code_assist' || (!oauthType && isGeminiCodeAssist.value)) {
// Code Assist: show "CLI" + tier
// Code Assist: show "GCP" + tier
const tierMap: Record<string, string> = {
LEGACY: 'Free',
PRO: 'Pro',
ULTRA: 'Ultra'
}
const tierLabel = geminiTier.value ? tierMap[geminiTier.value] || 'Free' : 'Free'
return `CLI ${tierLabel}`
return `GCP ${tierLabel}`
} else if (oauthType === 'ai_studio') {
// AI Studio: just show "AI Studio" (no tier)
return 'AI Studio'