Add timestamp editor

This commit is contained in:
Martin Pander
2026-02-02 10:55:47 +01:00
parent 7032d0fa54
commit fc8e9481c3
19 changed files with 922 additions and 113 deletions

View File

@ -10,7 +10,7 @@ import (
type MainPage struct {
common *common.Common
activePage common.Component
taskPage common.Component
timePage common.Component
}
@ -22,7 +22,7 @@ func NewMainPage(common *common.Common) *MainPage {
m.taskPage = NewReportPage(common, common.TW.GetReport(common.TW.GetConfig().Get("uda.tasksquire.report.default")))
m.timePage = NewTimePage(common)
m.activePage = m.taskPage
return m
@ -39,7 +39,8 @@ func (m *MainPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.WindowSizeMsg:
m.common.SetSize(msg.Width, msg.Height)
case tea.KeyMsg:
if key.Matches(msg, m.common.Keymap.Next) {
// Only handle tab key for page switching when at the top level (no subpages active)
if key.Matches(msg, m.common.Keymap.Next) && !m.common.HasSubpages() {
if m.activePage == m.taskPage {
m.activePage = m.timePage
} else {