diff options
Diffstat (limited to 'internal/tui/app.go')
-rw-r--r-- | internal/tui/app.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/internal/tui/app.go b/internal/tui/app.go index 34310bd..433a5ad 100644 --- a/internal/tui/app.go +++ b/internal/tui/app.go @@ -153,6 +153,12 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.historyBox.changeSelection(msg.Forward) } + case selectionToEnd: + switch m.selectedBox { + case HistoryBox: + m.historyBox.changeSelectionToEnd(msg.Top) + } + case drillDownMsg: if m.selectedBox == HistoryBox { m.historyBox.drillDown() @@ -176,7 +182,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.historyBox.selectedEntry().ID) + m.modalBox.activate(ModalTypeDeleteConfirmation, m.historyBox.selectedEntry().ID, m) } case recheckBounds: @@ -186,7 +192,7 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } case openCreateClientModal: - m.modalBox.activate(ModalTypeClient, 0) + m.modalBox.activate(ModalTypeClient, 0, m) m.modalBox.form.fields[0].Focus() case openCreateProjectModal: @@ -205,7 +211,7 @@ func (m AppModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (m *AppModel) openEntryEditor() { - m.modalBox.activate(ModalTypeEntry, m.historyBox.selectedEntry().ID) + m.modalBox.activate(ModalTypeEntry, m.historyBox.selectedEntry().ID, *m) m.modalBox.form.fields[0].Focus() entry := m.historyBox.selectedEntry() @@ -236,7 +242,7 @@ func (m *AppModel) openEntryEditor() { } func (m *AppModel) openHistoryFilterModal() { - m.modalBox.activate(ModalTypeHistoryFilter, 0) + m.modalBox.activate(ModalTypeHistoryFilter, 0, *m) m.modalBox.form.fields[0].Focus() // Pre-populate form with current filter values |