Files
tasksquire/common/common.go
2024-05-20 21:17:47 +02:00

28 lines
495 B
Go

package common
import (
"context"
"tasksquire/taskwarrior"
tea "github.com/charmbracelet/bubbletea"
)
type Common struct {
Ctx context.Context
PageStack *Stack[tea.Model]
TW taskwarrior.TaskWarrior
Keymap *Keymap
Styles *Styles
}
func NewCommon(ctx context.Context, tw taskwarrior.TaskWarrior) *Common {
return &Common{
Ctx: ctx,
PageStack: NewStack[tea.Model](),
TW: tw,
Keymap: NewKeymap(),
Styles: NewStyles(tw.GetConfig()),
}
}