Restore git panel header (#26354)
Let's play around with it. This should not be added to tomorrow's preview. Release Notes: - Git Beta: Added a panel header with an open diff and stage/unstage all buttons.
This commit is contained in:
parent
d732b8ba0f
commit
230e2e4107
2 changed files with 61 additions and 2 deletions
|
@ -64,6 +64,22 @@ pub fn init(cx: &mut App) {
|
|||
panel.pull(window, cx);
|
||||
});
|
||||
});
|
||||
workspace.register_action(|workspace, action: &git::StageAll, window, cx| {
|
||||
let Some(panel) = workspace.panel::<git_panel::GitPanel>(cx) else {
|
||||
return;
|
||||
};
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.stage_all(action, window, cx);
|
||||
});
|
||||
});
|
||||
workspace.register_action(|workspace, action: &git::UnstageAll, window, cx| {
|
||||
let Some(panel) = workspace.panel::<git_panel::GitPanel>(cx) else {
|
||||
return;
|
||||
};
|
||||
panel.update(cx, |panel, cx| {
|
||||
panel.unstage_all(action, window, cx);
|
||||
});
|
||||
});
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue