mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 11:01:22 +08:00
feat(settings): add app visibility settings
Allow users to choose which apps (Claude, Codex, Gemini, OpenCode) to display on the homepage. - Add VisibleApps type and settings field in both frontend and backend - Refactor AppSwitcher to render apps dynamically based on visibility - Extract ToggleRow component for reuse - Add i18n support for app visibility settings
This commit is contained in:
@@ -137,6 +137,14 @@ export interface ProviderMeta {
|
||||
proxyConfig?: ProviderProxyConfig;
|
||||
}
|
||||
|
||||
// 主页面显示的应用配置
|
||||
export interface VisibleApps {
|
||||
claude: boolean;
|
||||
codex: boolean;
|
||||
gemini: boolean;
|
||||
opencode: boolean;
|
||||
}
|
||||
|
||||
// 应用设置类型(用于设置对话框与 Tauri API)
|
||||
// 存储在本地 ~/.cc-switch/settings.json,不随数据库同步
|
||||
export interface Settings {
|
||||
@@ -154,6 +162,9 @@ export interface Settings {
|
||||
// 首选语言(可选,默认中文)
|
||||
language?: "en" | "zh" | "ja";
|
||||
|
||||
// 主页面显示的应用(默认全部显示)
|
||||
visibleApps?: VisibleApps;
|
||||
|
||||
// ===== 设备级目录覆盖 =====
|
||||
// 覆盖 Claude Code 配置目录(可选)
|
||||
claudeConfigDir?: string;
|
||||
|
||||
Reference in New Issue
Block a user