diff options
author | T <t@tjp.lol> | 2025-08-08 10:11:07 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-08-08 10:11:19 -0600 |
commit | 54c791927b2851fb6739ed75897090c3c39ecca1 (patch) | |
tree | 8f97b3509ccffed1351fe3d101e70c1cf0d861a9 /internal/tui/keys.go | |
parent | a7ee7f7280d593481501446008acc05e32abcd22 (diff) |
create forms for clients and projects
Diffstat (limited to 'internal/tui/keys.go')
-rw-r--r-- | internal/tui/keys.go | 14 |
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: { |