diff --git a/frontend/src/components/account/AccountStatusIndicator.vue b/frontend/src/components/account/AccountStatusIndicator.vue index af32ea0c..8816eb26 100644 --- a/frontend/src/components/account/AccountStatusIndicator.vue +++ b/frontend/src/components/account/AccountStatusIndicator.vue @@ -77,13 +77,23 @@ -
-
+
+
{{ formatScopeName(item.model) }} + {{ formatModelResetTime(item.reset_at) }}
{ }) const formatScopeName = (scope: string): string => { - const names: Record = { + const aliases: Record = { + // Claude 系列 + 'claude-opus-4-6-thinking': 'COpus46', + 'claude-sonnet-4-6': 'CSon46', + 'claude-sonnet-4-5': 'CSon45', + 'claude-sonnet-4-5-thinking': 'CSon45T', + // Gemini 2.5 系列 + 'gemini-2.5-flash': 'G25F', + 'gemini-2.5-flash-lite': 'G25FL', + 'gemini-2.5-flash-thinking': 'G25FT', + 'gemini-2.5-pro': 'G25P', + // Gemini 3 系列 + 'gemini-3-flash': 'G3F', + 'gemini-3.1-pro-high': 'G3PH', + 'gemini-3.1-pro-low': 'G3PL', + 'gemini-3-pro-image': 'G3PI', + // 其他 + 'gpt-oss-120b-medium': 'GPT120', + 'tab_flash_lite_preview': 'TabFL', + // 旧版 scope 别名(兼容) claude: 'Claude', - claude_sonnet: 'Claude Sonnet', - claude_opus: 'Claude Opus', - claude_haiku: 'Claude Haiku', + claude_sonnet: 'CSon', + claude_opus: 'COpus', + claude_haiku: 'CHaiku', gemini_text: 'Gemini', - gemini_image: 'Image', - gemini_flash: 'Gemini Flash', - gemini_pro: 'Gemini Pro' + gemini_image: 'GImg', + gemini_flash: 'GFlash', + gemini_pro: 'GPro', } - return names[scope] || scope + return aliases[scope] || scope +} + +const formatModelResetTime = (resetAt: string): string => { + const date = new Date(resetAt) + const now = new Date() + const diffMs = date.getTime() - now.getTime() + if (diffMs <= 0) return '' + const totalSecs = Math.floor(diffMs / 1000) + const h = Math.floor(totalSecs / 3600) + const m = Math.floor((totalSecs % 3600) / 60) + const s = totalSecs % 60 + if (h > 0) return `${h}h${m}m` + if (m > 0) return `${m}m${s}s` + return `${s}s` } // Computed: is overloaded (529)