Add things

This commit is contained in:
Martin Pander
2026-02-10 15:54:08 +01:00
parent e35f480248
commit 703ed981ac
13 changed files with 901 additions and 50 deletions

View File

@@ -33,6 +33,7 @@ type Keymap struct {
StartStop key.Binding
Join key.Binding
ViewDetails key.Binding
Subtask key.Binding
}
// TODO: use config values for key bindings
@@ -173,5 +174,10 @@ func NewKeymap() *Keymap {
key.WithKeys("v"),
key.WithHelp("v", "view details"),
),
Subtask: key.NewBinding(
key.WithKeys("S"),
key.WithHelp("S", "Create subtask"),
),
}
}

View File

@@ -29,7 +29,7 @@ type Task struct {
Depends []string `json:"depends,omitempty"`
DependsIds string `json:"-"`
Urgency float32 `json:"urgency,omitempty"`
Parent string `json:"parent,omitempty"`
Parent string `json:"parenttask,omitempty"`
Due string `json:"due,omitempty"`
Wait string `json:"wait,omitempty"`
Scheduled string `json:"scheduled,omitempty"`
@@ -125,7 +125,7 @@ func (t *Task) GetString(fieldWFormat string) string {
}
return strings.Join(t.Tags, " ")
case "parent":
case "parenttask":
if format == "short" {
return t.Parent[:8]
}