annotated main

This commit is contained in:
steven carpenter 2025-06-28 23:08:27 -04:00
parent bbbd0d60b6
commit 3071ce4250
5 changed files with 26 additions and 10 deletions

View file

@ -1,7 +1,7 @@
package main
import tea "github.com/charmbracelet/bubbletea"
// viewMode is used to store which view is being currently seen (i.e. month or hour)
type viewMode int
const (
@ -10,20 +10,21 @@ const (
)
type model struct {
cursorRow int
cursorCol int
monthIndex int
year int
cursorRow int // which row the cursor is sitting on used for cursor highlight
cursorCol int // which col the cursor is sitiing on used for cursor highlight
monthIndex int // what month 1-12 that is being displayed
year int // the current year being displayed
startOffset int // weekday offset where day 1 starts
daysInMonth int
daysInMonth int // a count of how many days there are in the month to account for 30,31,or 28
mode viewMode
// For hourly view
selectedDay int
selectedDay int // which day we are looking at in hourly view
hourCursor int // which hour (0-23) is selected in hourly view
}
//No init state
func (m model) Init() tea.Cmd {
return nil
}