Handle UDAs for editing; Fix layout; Add annotations

This commit is contained in:
Martin
2024-06-09 17:55:56 +02:00
parent 3e1cb9d1bc
commit bafd8958d4
12 changed files with 663 additions and 476 deletions

View File

@ -7,6 +7,7 @@ import (
"tasksquire/taskwarrior"
"github.com/charmbracelet/bubbles/key"
// "github.com/charmbracelet/bubbles/table"
tea "github.com/charmbracelet/bubbletea"
)
@ -24,7 +25,7 @@ type ReportPage struct {
taskTable table.Model
subpage tea.Model
subpage common.Component
}
func NewReportPage(com *common.Common, report *taskwarrior.Report) *ReportPage {
@ -54,8 +55,8 @@ func NewReportPage(com *common.Common, report *taskwarrior.Report) *ReportPage {
func (p *ReportPage) SetSize(width int, height int) {
p.common.SetSize(width, height)
p.taskTable.SetWidth(width - p.common.Styles.Base.GetVerticalFrameSize())
p.taskTable.SetHeight(height - p.common.Styles.Base.GetHorizontalFrameSize())
p.taskTable.SetWidth(width - p.common.Styles.Base.GetHorizontalFrameSize())
p.taskTable.SetHeight(height - p.common.Styles.Base.GetVerticalFrameSize())
}
func (p *ReportPage) Init() tea.Cmd {