1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

refactor contexts code

This commit is contained in:
Jesse Duffield
2022-01-29 19:09:20 +11:00
parent 1a74ed3214
commit 138be04e65
60 changed files with 1154 additions and 602 deletions

View File

@@ -3,7 +3,6 @@ package gui
import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/gui/controllers"
"github.com/jesseduffield/lazygit/pkg/gui/popup"
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
@@ -66,7 +65,7 @@ func (gui *Gui) handleStashApply() error {
return apply()
}
return gui.c.Ask(popup.AskOpts{
return gui.c.Ask(types.AskOpts{
Title: gui.c.Tr.StashApply,
Prompt: gui.c.Tr.SureApplyStashEntry,
HandleConfirm: func() error {
@@ -97,7 +96,7 @@ func (gui *Gui) handleStashPop() error {
return pop()
}
return gui.c.Ask(popup.AskOpts{
return gui.c.Ask(types.AskOpts{
Title: gui.c.Tr.StashPop,
Prompt: gui.c.Tr.SurePopStashEntry,
HandleConfirm: func() error {
@@ -112,7 +111,7 @@ func (gui *Gui) handleStashDrop() error {
return nil
}
return gui.c.Ask(popup.AskOpts{
return gui.c.Ask(types.AskOpts{
Title: gui.c.Tr.StashDrop,
Prompt: gui.c.Tr.SureDropStashEntry,
HandleConfirm: func() error {