mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
pkg/gui: Add support for 'notification' popups
Add a new 'Notification()' method to 'IPopupHandler' that makes it easier to show a modal info message to the user. This is simply a convenience wrapper around 'Ask()', so the popup can be closed using both 'Enter' and 'ESC'.
This commit is contained in:
committed by
Jesse Duffield
parent
ac406f57ff
commit
9bccc20888
@@ -50,6 +50,10 @@ type IGuiCommon interface {
|
||||
type IPopupHandler interface {
|
||||
ErrorMsg(message string) error
|
||||
Error(err error) error
|
||||
// Shows a notification popup with the given title and message to the user.
|
||||
//
|
||||
// This is a convenience wrapper around Ask(), thus the popup can be closed using both 'Enter' and 'ESC'.
|
||||
Alert(title string, message string) error
|
||||
Ask(opts AskOpts) error
|
||||
Prompt(opts PromptOpts) error
|
||||
WithLoaderPanel(message string, f func() error) error
|
||||
|
||||
Reference in New Issue
Block a user