From bbf30550c5cb2bfba5c03939b0a004d131714e9f Mon Sep 17 00:00:00 2001 From: ymkiux Date: Wed, 3 Jun 2026 23:31:17 +0800 Subject: [PATCH 1/8] feat(web-ui): optimize provider card layout and i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - 提供商卡片改为2列网格布局,提升空间利用率 - 统一配置状态徽章样式,缩小字号至9px - 补全 common.configured/notConfigured 多语言翻译 ## Technical changes - titles-cards.css: .card-list 改用 grid 2列布局,移动端自动降级单列 - titles-cards.css: .pill 字号从11px缩至9px,padding同步调整 - i18n: 在 zh/en/ja/vi 四语言中添加 common.configured/notConfigured - panel-config-claude.html: 统一使用 common.* namespace ## Test plan - [x] 配置页卡片横向2列显示 - [x] 移动端(<768px)降级单列 - [x] 徽章字号缩小,视觉紧凑 - [x] 多语言切换显示正常 --- web-ui/modules/i18n/locales/en.mjs | 2 ++ web-ui/modules/i18n/locales/ja.mjs | 2 ++ web-ui/modules/i18n/locales/vi.mjs | 2 ++ web-ui/modules/i18n/locales/zh.mjs | 2 ++ web-ui/partials/index/panel-config-claude.html | 2 +- web-ui/styles/titles-cards.css | 14 ++++++++++---- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/web-ui/modules/i18n/locales/en.mjs b/web-ui/modules/i18n/locales/en.mjs index 86b9baab..6837e99a 100644 --- a/web-ui/modules/i18n/locales/en.mjs +++ b/web-ui/modules/i18n/locales/en.mjs @@ -61,6 +61,8 @@ const en = Object.freeze({ 'common.notExistsWillCreateOnApply': 'Not found. Will be created on apply.', 'common.notExistsWillCreateOnSave': 'Not found. Will be created on save.', 'common.none': 'None', + 'common.configured': 'Configured', + 'common.notConfigured': 'Not configured', 'cli.missing.title': '{name} CLI not installed', 'cli.missing.subtitle': 'Install {name} CLI before using this page.', 'cli.missing.openDocs': 'Open install guide', diff --git a/web-ui/modules/i18n/locales/ja.mjs b/web-ui/modules/i18n/locales/ja.mjs index 376af5ed..7d39ab66 100644 --- a/web-ui/modules/i18n/locales/ja.mjs +++ b/web-ui/modules/i18n/locales/ja.mjs @@ -62,6 +62,8 @@ const ja = Object.freeze({ 'common.notExistsWillCreateOnApply': '存在しません。適用時に作成されます', 'common.notExistsWillCreateOnSave': '存在しません。保存時に作成されます', 'common.none': 'なし', + 'common.configured': '設定済み', + 'common.notConfigured': '未設定', 'cli.missing.title': '{name} CLI がインストールされていません', 'cli.missing.subtitle': '{name} CLI をインストールしてからこのページをご利用ください。', 'cli.missing.openDocs': 'インストールガイドを開く', diff --git a/web-ui/modules/i18n/locales/vi.mjs b/web-ui/modules/i18n/locales/vi.mjs index cf6b2a8a..a46409f4 100644 --- a/web-ui/modules/i18n/locales/vi.mjs +++ b/web-ui/modules/i18n/locales/vi.mjs @@ -71,6 +71,8 @@ const vi = Object.freeze({ 'common.notExistsWillCreateOnApply': 'Không tồn tại. Sẽ được tạo khi áp dụng.', 'common.notExistsWillCreateOnSave': 'Không tồn tại. Sẽ được tạo khi lưu.', 'common.none': 'Không có', + 'common.configured': 'Đã cấu hình', + 'common.notConfigured': 'Chưa cấu hình', 'common.notSelected': 'Chưa chọn', // Roles / labels diff --git a/web-ui/modules/i18n/locales/zh.mjs b/web-ui/modules/i18n/locales/zh.mjs index 7b17aca3..38cbad89 100644 --- a/web-ui/modules/i18n/locales/zh.mjs +++ b/web-ui/modules/i18n/locales/zh.mjs @@ -61,6 +61,8 @@ const zh = Object.freeze({ 'common.notExistsWillCreateOnApply': '不存在,将在应用时创建', 'common.notExistsWillCreateOnSave': '不存在,将在保存时创建', 'common.none': '暂无', + 'common.configured': '已配置', + 'common.notConfigured': '未配置', 'cli.missing.title': '{name} CLI 未安装', 'cli.missing.subtitle': '请先安装 {name} CLI 后再继续使用此页面。', 'cli.missing.openDocs': '打开安装指南', diff --git a/web-ui/partials/index/panel-config-claude.html b/web-ui/partials/index/panel-config-claude.html index 090f4424..5f1ebc07 100644 --- a/web-ui/partials/index/panel-config-claude.html +++ b/web-ui/partials/index/panel-config-claude.html @@ -154,7 +154,7 @@
{{ formatLatency(claudeSpeedResults[name]) }} - {{ config.hasKey ? t('claude.configured') : t('claude.notConfigured') }} + {{ config.hasKey ? t('common.configured') : t('common.notConfigured') }}