From 54c791927b2851fb6739ed75897090c3c39ecca1 Mon Sep 17 00:00:00 2001 From: T Date: Fri, 8 Aug 2025 10:11:07 -0600 Subject: create forms for clients and projects --- internal/tui/keys.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'internal/tui/keys.go') 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: { -- cgit v1.2.3