chore(git_panel): prevent footer and header rendering on no git access
This commit is contained in:
@@ -3944,6 +3944,10 @@ impl GitPanel {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<impl IntoElement> {
|
||||
if matches!(self.git_access, GitAccess::No) {
|
||||
return None;
|
||||
}
|
||||
|
||||
self.active_repository.as_ref()?;
|
||||
|
||||
let (text, action, stage, tooltip) =
|
||||
@@ -4032,6 +4036,9 @@ impl GitPanel {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Option<impl IntoElement> {
|
||||
if matches!(self.git_access, GitAccess::No) {
|
||||
return None;
|
||||
}
|
||||
let active_repository = self.active_repository.clone()?;
|
||||
let panel_editor_style = panel_editor_style(true, window, cx);
|
||||
let enable_coauthors = self.render_co_authors(cx);
|
||||
|
||||
Reference in New Issue
Block a user