TUI: add quit confirmation

This commit is contained in:
Moira Daniella A Sebastian
2026-03-20 13:55:00 +01:00
parent 6a91abc13f
commit 6d72c9195b
10 changed files with 151 additions and 4 deletions

View File

@@ -59,7 +59,8 @@ func (d *Model) handleKeyMsg(msg tea.KeyMsg) tea.Cmd {
case key.Matches(msg, d.keyMap.Help):
d.helpBar.ToggleHelp()
case key.Matches(msg, d.keyMap.Quit):
return tea.Quit
d.startConfirmQuit()
return nil
case !d.IsInModal() && msg.String() == " ":
return func() tea.Msg { return nil } // consume space
case !d.IsInModal() && key.Matches(msg, d.keyMap.SwitchToDashboard):