+
+
+ setTheme("light")}
+ icon={Sun}
+ >
+ {t("settings.themeLight", { defaultValue: "浅色" })}
+
+ setTheme("dark")}
+ icon={Moon}
+ >
+ {t("settings.themeDark", { defaultValue: "深色" })}
+
+ setTheme("system")}
+ icon={Monitor}
+ >
+ {t("settings.themeSystem", { defaultValue: "跟随系统" })}
+
+
+
+ );
+}
+
+interface ThemeButtonProps {
+ active: boolean;
+ onClick: () => void;
+ icon: React.ComponentType<{ className?: string }>;
+ children: React.ReactNode;
+}
+
+function ThemeButton({ active, onClick, icon: Icon, children }: ThemeButtonProps) {
+ return (
+
+ );
+}
diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json
index 6ea9d8b..77b4b12 100644
--- a/src/i18n/locales/en.json
+++ b/src/i18n/locales/en.json
@@ -87,6 +87,12 @@
"title": "Settings",
"general": "General",
"language": "Language",
+ "languageHint": "Preview interface language immediately after switching, takes effect permanently after saving.",
+ "theme": "Theme",
+ "themeHint": "Choose the appearance theme for the app, takes effect immediately.",
+ "themeLight": "Light",
+ "themeDark": "Dark",
+ "themeSystem": "System",
"importExport": "Import/Export Config",
"exportConfig": "Export Config to File",
"selectConfigFile": "Select Config File",
diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json
index ee1c046..e24ecae 100644
--- a/src/i18n/locales/zh.json
+++ b/src/i18n/locales/zh.json
@@ -87,6 +87,12 @@
"title": "设置",
"general": "通用",
"language": "界面语言",
+ "languageHint": "切换后立即预览界面语言,保存后永久生效。",
+ "theme": "外观主题",
+ "themeHint": "选择应用的外观主题,立即生效。",
+ "themeLight": "浅色",
+ "themeDark": "深色",
+ "themeSystem": "跟随系统",
"importExport": "导入导出配置",
"exportConfig": "导出配置到文件",
"selectConfigFile": "选择配置文件",