restructured main
This commit is contained in:
parent
e59765bfc6
commit
bbbd0d60b6
5 changed files with 272 additions and 0 deletions
30
model.go
Normal file
30
model.go
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue