Add time page

This commit is contained in:
Martin
2026-02-01 21:30:19 +01:00
committed by Martin Pander
parent effd95f6c1
commit 681ed7e635
12 changed files with 915 additions and 115 deletions

View File

@ -6,6 +6,7 @@ import (
"os"
"tasksquire/taskwarrior"
"tasksquire/timewarrior"
"golang.org/x/term"
)
@ -13,6 +14,7 @@ import (
type Common struct {
Ctx context.Context
TW taskwarrior.TaskWarrior
TimeW timewarrior.TimeWarrior
Keymap *Keymap
Styles *Styles
Udas []taskwarrior.Uda
@ -22,10 +24,11 @@ type Common struct {
height int
}
func NewCommon(ctx context.Context, tw taskwarrior.TaskWarrior) *Common {
func NewCommon(ctx context.Context, tw taskwarrior.TaskWarrior, timeW timewarrior.TimeWarrior) *Common {
return &Common{
Ctx: ctx,
TW: tw,
TimeW: timeW,
Keymap: NewKeymap(),
Styles: NewStyles(tw.GetConfig()),
Udas: tw.GetUdas(),