28 lines
495 B
Go
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()),
|
|
}
|
|
}
|