Skip to content

Commit bbf3055

Browse files
committed
feat(web-ui): optimize provider card layout and i18n
## 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] 多语言切换显示正常
1 parent 6cd3134 commit bbf3055

6 files changed

Lines changed: 19 additions & 5 deletions

File tree

web-ui/modules/i18n/locales/en.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ const en = Object.freeze({
6161
'common.notExistsWillCreateOnApply': 'Not found. Will be created on apply.',
6262
'common.notExistsWillCreateOnSave': 'Not found. Will be created on save.',
6363
'common.none': 'None',
64+
'common.configured': 'Configured',
65+
'common.notConfigured': 'Not configured',
6466
'cli.missing.title': '{name} CLI not installed',
6567
'cli.missing.subtitle': 'Install {name} CLI before using this page.',
6668
'cli.missing.openDocs': 'Open install guide',

web-ui/modules/i18n/locales/ja.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ const ja = Object.freeze({
6262
'common.notExistsWillCreateOnApply': '存在しません。適用時に作成されます',
6363
'common.notExistsWillCreateOnSave': '存在しません。保存時に作成されます',
6464
'common.none': 'なし',
65+
'common.configured': '設定済み',
66+
'common.notConfigured': '未設定',
6567
'cli.missing.title': '{name} CLI がインストールされていません',
6668
'cli.missing.subtitle': '{name} CLI をインストールしてからこのページをご利用ください。',
6769
'cli.missing.openDocs': 'インストールガイドを開く',

web-ui/modules/i18n/locales/vi.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ const vi = Object.freeze({
7171
'common.notExistsWillCreateOnApply': 'Không tồn tại. Sẽ được tạo khi áp dụng.',
7272
'common.notExistsWillCreateOnSave': 'Không tồn tại. Sẽ được tạo khi lưu.',
7373
'common.none': 'Không có',
74+
'common.configured': 'Đã cấu hình',
75+
'common.notConfigured': 'Chưa cấu hình',
7476
'common.notSelected': 'Chưa chọn',
7577

7678
// Roles / labels

web-ui/modules/i18n/locales/zh.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ const zh = Object.freeze({
6161
'common.notExistsWillCreateOnApply': '不存在,将在应用时创建',
6262
'common.notExistsWillCreateOnSave': '不存在,将在保存时创建',
6363
'common.none': '暂无',
64+
'common.configured': '已配置',
65+
'common.notConfigured': '未配置',
6466
'cli.missing.title': '{name} CLI 未安装',
6567
'cli.missing.subtitle': '请先安装 {name} CLI 后再继续使用此页面。',
6668
'cli.missing.openDocs': '打开安装指南',

web-ui/partials/index/panel-config-claude.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
</div>
155155
<div class="card-trailing">
156156
<span v-if="claudeSpeedResults[name]" :class="['latency', claudeSpeedResults[name].ok ? 'ok' : 'error']">{{ formatLatency(claudeSpeedResults[name]) }}</span>
157-
<span :class="['pill', config.hasKey ? 'configured' : 'empty']">{{ config.hasKey ? t('claude.configured') : t('claude.notConfigured') }}</span>
157+
<span :class="['pill', config.hasKey ? 'configured' : 'empty']">{{ config.hasKey ? t('common.configured') : t('common.notConfigured') }}</span>
158158
<div class="card-actions" @click.stop>
159159
<button class="card-action-btn" @click="openEditConfigModal(name)" :aria-label="t('claude.action.editAria', { name })" :title="t('claude.action.edit')">
160160
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>

web-ui/styles/titles-cards.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,18 @@
7575
卡片列表
7676
============================================ */
7777
.card-list {
78-
display: flex;
79-
flex-direction: column;
78+
display: grid;
79+
grid-template-columns: repeat(2, 1fr);
8080
gap: 10px;
8181
margin-bottom: 8px;
8282
}
8383

84+
@media (max-width: 768px) {
85+
.card-list {
86+
grid-template-columns: 1fr;
87+
}
88+
}
89+
8490
/* ============================================
8591
卡片
8692
============================================ */
@@ -368,9 +374,9 @@
368374
状态徽章
369375
============================================ */
370376
.pill {
371-
padding: 5px 11px;
377+
padding: 4px 9px;
372378
border-radius: var(--radius-full);
373-
font-size: var(--font-size-caption);
379+
font-size: 9px;
374380
font-weight: var(--font-weight-caption);
375381
background-color: rgba(255, 255, 255, 0.8);
376382
color: var(--color-text-tertiary);

0 commit comments

Comments
 (0)