Initial commit
This commit is contained in:
27
common/common.go
Normal file
27
common/common.go
Normal file
@ -0,0 +1,27 @@
|
||||
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()),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user