add task system and task model for viewing task details

This commit is contained in:
Robin Olsen
2026-02-12 20:40:55 +01:00
parent da8ab0833e
commit 183f13895b
7 changed files with 234 additions and 0 deletions

27
cmd/survey/ui/help.go Normal file
View File

@@ -0,0 +1,27 @@
package ui
import "github.com/charmbracelet/bubbles/key"
type TaskHelpKeys struct {
Quit key.Binding
Continue key.Binding
}
var DefaultTaskKeys = TaskHelpKeys{
Quit: key.NewBinding(
key.WithKeys("q", "ctrl+c"),
key.WithHelp("q", "Quit"),
),
Continue: key.NewBinding(
key.WithKeys(" "),
key.WithHelp("space", "Continue"),
),
}
func (h TaskHelpKeys) ShortHelp() []key.Binding {
return []key.Binding{h.Continue, h.Quit}
}
func (h TaskHelpKeys) FullHelp() [][]key.Binding {
return [][]key.Binding{{h.Continue, h.Quit}}
}