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

@ -237,7 +237,9 @@ impl Render for TitleBar {
el.child(self.render_user_menu_button(cx))
} else {
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))
}
}),

View file

@ -26,6 +26,10 @@ pub struct TitleBarSettings {
///
/// Default: true
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 {
@ -36,6 +40,7 @@ impl Default for TitleBarSettings {
show_user_picture: true,
show_branch_name: true,
show_project_items: true,
show_sign_in: true,
}
}
}