GoCalTui/model.go

30 lines
460 B
Go

package main
import tea "github.com/charmbracelet/bubbletea"
type viewMode int
const (
monthView viewMode = iota
hourlyView
)
type model struct {
cursorRow int
cursorCol int
monthIndex int
year int
startOffset int // weekday offset where day 1 starts
daysInMonth int
mode viewMode
// For hourly view
selectedDay int
hourCursor int // which hour (0-23) is selected in hourly view
}
func (m model) Init() tea.Cmd {
return nil
}