Add setting to disable the sign in button (#30450)

Designed to pair with #30444 to enable enterprises to make it harder to
sign into the collab server and perhaps accidentally end up sending code
to Zed.

Release Notes:

- N/A

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Tristan Hume 2025-05-14 09:39:04 -04:00 committed by GitHub
parent b6828e5ce8
commit 96a0568fb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 2 deletions

View file

@ -335,7 +335,9 @@
// Whether to show onboarding banners in the titlebar. // Whether to show onboarding banners in the titlebar.
"show_onboarding_banner": true, "show_onboarding_banner": true,
// Whether to show user picture in the titlebar. // Whether to show user picture in the titlebar.
"show_user_picture": true "show_user_picture": true,
// Whether to show the sign in button in the titlebar.
"show_sign_in": true
}, },
// Scrollbar related settings // Scrollbar related settings
"scrollbar": { "scrollbar": {

View file

@ -237,7 +237,9 @@ impl Render for TitleBar {
el.child(self.render_user_menu_button(cx)) el.child(self.render_user_menu_button(cx))
} else { } else {
el.children(self.render_connection_status(status, cx)) el.children(self.render_connection_status(status, cx))
.child(self.render_sign_in_button(cx)) .when(TitleBarSettings::get_global(cx).show_sign_in, |el| {
el.child(self.render_sign_in_button(cx))
})
.child(self.render_user_menu_button(cx)) .child(self.render_user_menu_button(cx))
} }
}), }),

View file

@ -26,6 +26,10 @@ pub struct TitleBarSettings {
/// ///
/// Default: true /// Default: true
pub show_project_items: bool, pub show_project_items: bool,
/// Whether to show the sign in button in the title bar.
///
/// Default: true
pub show_sign_in: bool,
} }
impl Default for TitleBarSettings { impl Default for TitleBarSettings {
@ -36,6 +40,7 @@ impl Default for TitleBarSettings {
show_user_picture: true, show_user_picture: true,
show_branch_name: true, show_branch_name: true,
show_project_items: true, show_project_items: true,
show_sign_in: true,
} }
} }
} }