summaryrefslogtreecommitdiff
path: root/internal/tui/commands.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui/commands.go')
-rw-r--r--internal/tui/commands.go31
1 files changed, 26 insertions, 5 deletions
diff --git a/internal/tui/commands.go b/internal/tui/commands.go
index 4a19551..be5c8dc 100644
--- a/internal/tui/commands.go
+++ b/internal/tui/commands.go
@@ -9,11 +9,16 @@ import (
)
type (
- navigationMsg struct{ Forward bool }
- selectionMsg struct{ Forward bool }
- drillDownMsg struct{}
- drillUpMsg struct{}
- searchActivated struct{}
+ navigationMsg struct{ Forward bool }
+ selectionMsg struct{ Forward bool }
+ drillDownMsg struct{}
+ drillUpMsg struct{}
+ searchActivated struct{}
+ modalClosed struct{}
+ openTimeEntryEditor struct{}
+ openModalUnchanged struct{}
+ openDeleteConfirmation struct{}
+ recheckBounds struct{}
)
func navigate(forward bool) tea.Cmd {
@@ -68,3 +73,19 @@ func changeSelection(forward bool) tea.Cmd {
func activateSearch() tea.Cmd {
return func() tea.Msg { return searchActivated{} }
}
+
+func closeModal() tea.Cmd {
+ return func() tea.Msg { return modalClosed{} }
+}
+
+func editCurrentEntry() tea.Cmd {
+ return func() tea.Msg { return openTimeEntryEditor{} }
+}
+
+func reOpenModal() tea.Cmd {
+ return func() tea.Msg { return openModalUnchanged{} }
+}
+
+func confirmDeleteEntry() tea.Cmd {
+ return func() tea.Msg { return openDeleteConfirmation{} }
+}