feat(tray): sync tray menu with app visibility settings

Apply visibleApps setting to filter tray menu sections, so hidden apps
no longer appear in the system tray menu.
This commit is contained in:
Jason
2026-01-20 19:37:07 +08:00
parent eab1d08527
commit c9e85e8cac
2 changed files with 21 additions and 0 deletions
+12
View File
@@ -45,6 +45,18 @@ impl Default for VisibleApps {
}
}
impl VisibleApps {
/// Check if the specified app is visible
pub fn is_visible(&self, app: &AppType) -> bool {
match app {
AppType::Claude => self.claude,
AppType::Codex => self.codex,
AppType::Gemini => self.gemini,
AppType::OpenCode => self.opencode,
}
}
}
/// 应用设置结构
///
/// 存储设备级别设置,保存在本地 `~/.cc-switch/settings.json`,不随数据库同步。