diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2023-12-22 17:31:13 +0100 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-01-14 17:45:35 +0100 |
commit | 99a3ccde71ceebcbf8045655ef604a1965e64a5a (patch) | |
tree | bb66b951db6d0bdfa84c82e94aec4105a234fcc8 /pkg/gui/types | |
parent | 8ca8a4396859559d818c2b5a51411da7d618ee70 (diff) |
Add ErrorToast function
Diffstat (limited to 'pkg/gui/types')
-rw-r--r-- | pkg/gui/types/common.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index 6e16df6b0..afa4156c8 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -144,10 +144,18 @@ type IPopupHandler interface { WithWaitingStatusSync(message string, f func() error) error Menu(opts CreateMenuOptions) error Toast(message string) - SetToastFunc(func(string)) + ErrorToast(message string) + SetToastFunc(func(string, ToastKind)) GetPromptInput() string } +type ToastKind int + +const ( + ToastKindStatus ToastKind = iota + ToastKindError +) + type CreateMenuOptions struct { Title string Items []*MenuItem |