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

@@ -4,11 +4,11 @@ import (
"fmt"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/gui/popup"
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
func (gui *Gui) showUpdatePrompt(newVersion string) error {
return gui.c.Ask(popup.AskOpts{
return gui.c.Ask(types.AskOpts{
Title: "New version available!",
Prompt: fmt.Sprintf("Download version %s? (enter/esc)", newVersion),
HandleConfirm: func() error {
@@ -65,7 +65,7 @@ func (gui *Gui) onUpdateFinish(statusId int, err error) error {
}
func (gui *Gui) createUpdateQuitConfirmation() error {
return gui.c.Ask(popup.AskOpts{
return gui.c.Ask(types.AskOpts{
Title: "Currently Updating",
Prompt: "An update is in progress. Are you sure you want to quit?",
HandleConfirm: func() error {