style(ui): simplify theme labels and arrange options in one row

- Rename theme options to Light, Dark, and Auto across locales
- Display all three options in a single row
- Update localization test expectations
This commit is contained in:
lzt404 committed 2026-09-15 02:39:03 +08:00
1 parent 0c37f4d1bb
commit 67484ac423
7 files changed
+25 -29

No files matched your search

+6 -6
View File
@@ -14,8 +14,8 @@ export const easyModeZhCN = {
"easyMode.guide.toggleOpen": "点击开启操作指引",
"easyMode.guide.toggleClose": "点击关闭操作指引",
"easyMode.guide.close": "关闭指导",
"easyMode.theme.light": "明亮主题",
"easyMode.theme.dark": "暗色主题",
"easyMode.theme.light": "亮色",
"easyMode.theme.dark": "暗色",
"easyMode.language.switch": "切换语言",
"easyMode.exit": "退出新手模式",
"easyMode.exitTitle": "返回常规控制台",
@@ -96,8 +96,8 @@ export const easyModeEn: Record<keyof typeof easyModeZhCN, string> = {
"easyMode.guide.toggleOpen": "Click to open interactive guide",
"easyMode.guide.toggleClose": "Click to close interactive guide",
"easyMode.guide.close": "Close guide",
"easyMode.theme.light": "Light theme",
"easyMode.theme.dark": "Dark theme",
"easyMode.theme.light": "Light",
"easyMode.theme.dark": "Dark",
"easyMode.language.switch": "Switch language",
"easyMode.exit": "Exit Beginner Mode",
"easyMode.exitTitle": "Return to standard console",
@@ -178,8 +178,8 @@ export const easyModeJa: Record<keyof typeof easyModeZhCN, string> = {
"easyMode.guide.toggleOpen": "クリックして操作ガイドを開始",
"easyMode.guide.toggleClose": "クリックして操作ガイドを閉じる",
"easyMode.guide.close": "ガイドを閉じる",
"easyMode.theme.light": "ライトテーマ",
"easyMode.theme.dark": "ダークテーマ",
"easyMode.theme.light": "ライト",
"easyMode.theme.dark": "ダーク",
"easyMode.language.switch": "言語を切り替え",
"easyMode.exit": "ビギナーモードを終了",
"easyMode.exitTitle": "通常コンソールに戻る",
+3 -3
View File
@@ -221,10 +221,10 @@ export const jaOverrides = {
'apiAccess.models.aliasPlaceholder': 'モデル別名(任意)',
'apiAccess.models.remove': 'モデルを削除',
'app.language': '言語',
'app.theme.light': 'ライトモード',
'app.theme.dark': 'ダークモード',
'app.theme.light': 'ライト',
'app.theme.dark': 'ダーク',
'app.theme.label': '外観モード',
'app.theme.system': 'システムに従う',
'app.theme.system': '自動',
'app.theme.switchToSystem': 'システムの外観に合わせて自動的に切り替え',
'app.theme.switchToLight': 'ライトモードに切り替え',
'app.theme.switchToDark': 'ダークモードに切り替え',
+3 -3
View File
@@ -170,10 +170,10 @@ export const en: Record<MessageKey, string> = {
'apiAccess.models.aliasPlaceholder': 'Model alias (optional)',
'apiAccess.models.remove': 'Remove model',
'app.language': 'Language',
'app.theme.light': 'Light mode',
'app.theme.dark': 'Dark mode',
'app.theme.light': 'Light',
'app.theme.dark': 'Dark',
'app.theme.label': 'Appearance',
'app.theme.system': 'Follow system',
'app.theme.system': 'Auto',
'app.theme.switchToSystem': 'Automatically match the system appearance',
'app.theme.switchToLight': 'Switch to light mode',
'app.theme.switchToDark': 'Switch to dark mode',
+6 -6
View File
@@ -169,13 +169,13 @@ export const zhCN = {
'apiAccess.models.aliasPlaceholder': '模型别名(可选)',
'apiAccess.models.remove': '删除模型',
'app.language': '语言',
'app.theme.light': '日间模式',
'app.theme.dark': '夜间模式',
'app.theme.light': '亮色',
'app.theme.dark': '暗色',
'app.theme.label': '外观模式',
'app.theme.system': '跟随系统',
'app.theme.switchToSystem': '随系统自动切换日间和夜间模式',
'app.theme.switchToLight': '切换到日间模式',
'app.theme.switchToDark': '切换到夜间模式',
'app.theme.system': '自动',
'app.theme.switchToSystem': '随系统自动切换亮色和暗色',
'app.theme.switchToLight': '切换到亮色',
'app.theme.switchToDark': '切换到暗色',
'app.desktopConsole': '桌面控制台',
'app.navigation': '主导航',
'app.nav.easy': '新手模式',
+1 -1
View File
@@ -1,5 +1,5 @@
const phraseReplacements: ReadonlyArray<readonly [string, string]> = [
['随系统自动切换日间和夜间模式', '隨系統自動切換日間和夜間模式'],
['随系统自动切换亮色和暗色', '隨系統自動切換亮色和暗色'],
['跟随系统', '跟隨系統'],
['外观模式', '外觀模式'],
['登录系统后自动启动', '登入系統後自動啟動'],
+1 -5
View File
@@ -637,7 +637,7 @@ textarea:focus-visible {
.sidebar-theme-selector {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 3px;
width: 100%;
padding: 3px;
@@ -660,10 +660,6 @@ textarea:focus-visible {
white-space: nowrap;
}
.sidebar-theme-selector button:last-child {
grid-column: 1 / -1;
}
.sidebar-theme-selector button:hover {
background: var(--theme-e8e5dc);
color: var(--theme-2d2a26);
+5 -5
View File
@@ -5,12 +5,12 @@ import { jaOverrides } from '../src/i18n/ja';
describe('i18n', () => {
it('localizes system appearance controls in every language', () => {
expect(translate('zh-CN', 'app.theme.system')).toBe('跟随系统');
expect(translate('zh-TW', 'app.theme.system')).toBe('跟隨系統');
expect(translate('zh-CN', 'app.theme.system')).toBe('自动');
expect(translate('zh-TW', 'app.theme.system')).toBe('自動');
expect(translate('zh-TW', 'app.theme.label')).toBe('外觀模式');
expect(translate('zh-TW', 'app.theme.switchToSystem')).toBe('隨系統自動切換日間和夜間模式');
expect(translate('en', 'app.theme.system')).toBe('Follow system');
expect(translate('ja', 'app.theme.system')).toBe('システムに従う');
expect(translate('zh-TW', 'app.theme.switchToSystem')).toBe('隨系統自動切換亮色和暗色');
expect(translate('en', 'app.theme.system')).toBe('Auto');
expect(translate('ja', 'app.theme.system')).toBe('自動');
});
it('uses credential-file terminology throughout both Chinese locales', () => {