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:
parent
b6828e5ce8
commit
96a0568fb7
3 changed files with 11 additions and 2 deletions
|
@ -335,7 +335,9 @@
|
|||
// Whether to show onboarding banners in the titlebar.
|
||||
"show_onboarding_banner": true,
|
||||
// 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": {
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
}),
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue