feat(settings): add enableLocalProxy toggle to gate main page proxy UI

New users often accidentally trigger ProxyToggle/FailoverToggle on the
main page. Add a settings toggle (default off) so the proxy controls
only appear when explicitly enabled. The proxy service start/stop in
settings remains independent of this visibility flag.
This commit is contained in:
Jason
2026-02-19 23:06:22 +08:00
parent 1b71dc721c
commit 0fa6b33b5e
9 changed files with 46 additions and 20 deletions
+4
View File
@@ -187,6 +187,9 @@ pub struct AppSettings {
/// 静默启动(程序启动时不显示主窗口,仅托盘运行)
#[serde(default)]
pub silent_startup: bool,
/// 是否在主页面启用本地代理功能(默认关闭)
#[serde(default)]
pub enable_local_proxy: bool,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub language: Option<String>,
@@ -262,6 +265,7 @@ impl Default for AppSettings {
skip_claude_onboarding: false,
launch_on_startup: false,
silent_startup: false,
enable_local_proxy: false,
language: None,
visible_apps: None,
claude_config_dir: None,