1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

clean up interface for popup panels

This commit is contained in:
Jesse Duffield
2020-08-15 16:36:39 +10:00
parent c44ee71ad4
commit d9fa02c53b
34 changed files with 674 additions and 396 deletions

View File

@ -133,9 +133,15 @@ func (gui *Gui) handlePullPatchIntoWorkingTree() error {
}
if len(gui.trackedFiles()) > 0 {
return gui.createConfirmationPanel(gui.g, gui.g.CurrentView(), true, gui.Tr.SLocalize("MustStashTitle"), gui.Tr.SLocalize("MustStashWarning"), func(*gocui.Gui, *gocui.View) error {
return pull(true)
}, nil)
return gui.createConfirmationPanel(createConfirmationPanelOpts{
returnToView: gui.g.CurrentView(),
returnFocusOnClose: true,
title: gui.Tr.SLocalize("MustStashTitle"),
prompt: gui.Tr.SLocalize("MustStashWarning"),
handleConfirm: func() error {
return pull(true)
},
})
} else {
return pull(false)
}