summaryrefslogtreecommitdiff
path: root/internal/tui/keys.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/tui/keys.go')
-rw-r--r--internal/tui/keys.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/internal/tui/keys.go b/internal/tui/keys.go
index e1ac587..71dc251 100644
--- a/internal/tui/keys.go
+++ b/internal/tui/keys.go
@@ -25,16 +25,6 @@ type KeyBinding struct {
Hide bool
}
-type (
- createClientMsg struct{}
- createProjectMsg struct{}
- editHistoryEntry struct{}
-)
-
-func msgAsCmd(msg tea.Msg) tea.Cmd {
- return func() tea.Msg { return msg }
-}
-
var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map[string]KeyBinding{
ScopeGlobal: {
"ctrl+n": KeyBinding{
@@ -133,12 +123,12 @@ var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map
"n": KeyBinding{
Key: "n",
Description: func(AppModel) string { return "New Project" },
- Result: func(*AppModel) tea.Cmd { return msgAsCmd(createProjectMsg{}) },
+ Result: func(*AppModel) tea.Cmd { return createProjectModal() },
},
"N": KeyBinding{
Key: "N",
Description: func(AppModel) string { return "New Client" },
- Result: func(*AppModel) tea.Cmd { return msgAsCmd(createClientMsg{}) },
+ Result: func(*AppModel) tea.Cmd { return createClientModal() },
},
},
ScopeHistoryBoxSummaries: {