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/app.go | |
parent | a7ee7f7280d593481501446008acc05e32abcd22 (diff) |
create forms for clients and projects
Diffstat (limited to 'internal/tui/app.go')
-rw-r--r-- | internal/tui/app.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/internal/tui/app.go b/internal/tui/app.go index e325116..0caf571 100644 --- a/internal/tui/app.go +++ b/internal/tui/app.go @@ -163,9 +163,6 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.historyBox.drillUp() } - case searchActivated: - m.modalBox.activate(ModalTypeSearch) - case modalClosed: m.modalBox.deactivate() @@ -179,8 +176,7 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case openDeleteConfirmation: if m.selectedBox == HistoryBox && m.historyBox.viewLevel == HistoryLevelDetails { - m.modalBox.activate(ModalTypeDeleteConfirmation) - m.modalBox.editedID = m.historyBox.selectedEntry().ID + m.modalBox.activate(ModalTypeDeleteConfirmation, m.historyBox.selectedEntry().ID) } case recheckBounds: @@ -189,14 +185,20 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.historyBox.recheckBounds() } + case openCreateClientModal: + m.modalBox.activate(ModalTypeClient, 0) + m.modalBox.form.fields[0].Focus() + + case openCreateProjectModal: + m.modalBox.activateCreateProjectModal(m) + } return m, tea.Batch(cmds...) } func (m *AppModel) openEntryEditor() { - m.modalBox.activate(ModalTypeEntry) - m.modalBox.editedID = m.historyBox.selectedEntry().ID + m.modalBox.activate(ModalTypeEntry, m.historyBox.selectedEntry().ID) f := m.modalBox.form f.fields[0].Focus() |