feat(profiles): add setting to toggle project switcher on main page

Add a show/hide toggle for the header project profile switcher under
the Homepage Display section in settings. Defaults to visible so
existing users keep the current behavior.
This commit is contained in:
Jason
2026-07-10 11:04:59 +08:00
parent 7479d10db7
commit 442799879d
8 changed files with 40 additions and 12 deletions
+8
View File
@@ -374,6 +374,9 @@ pub struct AppSettings {
/// Whether to show the failover toggle independently on the main page
#[serde(default)]
pub enable_failover_toggle: bool,
/// Whether to show the project profile switcher on the main page header
#[serde(default = "default_show_profile_switcher")]
pub show_profile_switcher: bool,
/// Keep Codex ChatGPT login material in auth.json when switching to third-party providers.
/// Opt-in: defaults to false so third-party switches cleanly overwrite auth.json.
#[serde(default)]
@@ -490,6 +493,10 @@ fn default_minimize_to_tray_on_close() -> bool {
true
}
fn default_show_profile_switcher() -> bool {
true
}
impl Default for AppSettings {
fn default() -> Self {
Self {
@@ -506,6 +513,7 @@ impl Default for AppSettings {
usage_dashboard_refresh_interval_ms: None,
stream_check_confirmed: None,
enable_failover_toggle: false,
show_profile_switcher: true,
preserve_codex_official_auth_on_switch: false,
unify_codex_session_history: false,
unify_codex_migrate_existing: None,