diff options
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() |