c2ea63dd16
Status bar with entity count and context-sensitive key hints. Help overlay via ? key. Tag filter via # with cursor-navigable tag list. Todo toggle (x), pin (!), promote (p), demote (D), copy (c), edit (e) via $EDITOR. Delete confirmation with 3s timeout. Date-grouped list with completed todo and pinned indicators. Esc clears active tag filter. Adds CompletedAt/ClearCompleted to EntityUpdate for todo toggling.
24 lines
460 B
Go
24 lines
460 B
Go
package tui
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
|
|
"github.com/lerko/nib/internal/display"
|
|
)
|
|
|
|
type confirmTimeoutMsg struct{}
|
|
|
|
func confirmTimeout() tea.Cmd {
|
|
return tea.Tick(3*time.Second, func(time.Time) tea.Msg {
|
|
return confirmTimeoutMsg{}
|
|
})
|
|
}
|
|
|
|
func renderConfirm(entityID string) string {
|
|
short := display.FormatID(entityID)
|
|
return errorStyle.Render(fmt.Sprintf("delete %s? y to confirm, any key to cancel", short))
|
|
}
|