From 8232812ac27477f68f11a69f1c31318eb5072f94 Mon Sep 17 00:00:00 2001 From: LTbinglingfeng Date: Fri, 2 Jan 2026 22:42:20 +0800 Subject: [PATCH] feat(ui): show AIStudio models for virtual auth files and adjust Gemini OAuth spacing --- src/pages/AuthFilesPage.tsx | 69 ++++++++++++++++++--------------- src/pages/OAuthPage.module.scss | 7 ++++ src/pages/OAuthPage.tsx | 28 ++++++------- 3 files changed, 59 insertions(+), 45 deletions(-) diff --git a/src/pages/AuthFilesPage.tsx b/src/pages/AuthFilesPage.tsx index 3371543..fdabaa3 100644 --- a/src/pages/AuthFilesPage.tsx +++ b/src/pages/AuthFilesPage.tsx @@ -719,9 +719,11 @@ export function AuthFilesPage() { const renderFileCard = (item: AuthFileItem) => { const fileStats = resolveAuthFileStats(item, keyStats); const isRuntimeOnly = isRuntimeOnlyAuthFile(item); + const isAistudio = (item.type || '').toLowerCase() === 'aistudio'; + const showModelsButton = !isRuntimeOnly || isAistudio; const typeColor = getTypeColor(item.type || 'unknown'); - - return ( + + return (
- {isRuntimeOnly ? ( -
{t('auth_files.type_virtual') || '虚拟认证文件'}
- ) : ( - <> - - + )} + {!isRuntimeOnly && ( + <> + @@ -799,13 +801,16 @@ export function AuthFilesPage() { > {deleting === item.name ? ( - ) : ( - - )} - - - )} -
+ ) : ( + + )} + + + )} + {isRuntimeOnly && ( +
{t('auth_files.type_virtual') || '虚拟认证文件'}
+ )} +
); }; diff --git a/src/pages/OAuthPage.module.scss b/src/pages/OAuthPage.module.scss index 777ecd1..199c024 100644 --- a/src/pages/OAuthPage.module.scss +++ b/src/pages/OAuthPage.module.scss @@ -115,6 +115,13 @@ margin-top: $spacing-sm; } +.geminiProjectField { + :global(.form-group) { + margin-top: $spacing-sm; + gap: $spacing-sm; + } +} + .filePicker { display: flex; align-items: center; diff --git a/src/pages/OAuthPage.tsx b/src/pages/OAuthPage.tsx index f93234d..a21beae 100644 --- a/src/pages/OAuthPage.tsx +++ b/src/pages/OAuthPage.tsx @@ -327,19 +327,21 @@ export function OAuthPage() { >
{t(provider.hintKey)}
{provider.id === 'gemini-cli' && ( - - updateProviderState(provider.id, { - projectId: e.target.value, - projectIdError: undefined - }) - } - placeholder={t('auth_login.gemini_cli_project_id_placeholder')} - /> +
+ + updateProviderState(provider.id, { + projectId: e.target.value, + projectIdError: undefined + }) + } + placeholder={t('auth_login.gemini_cli_project_id_placeholder')} + /> +
)} {state.url && (