Documentation
¶
Index ¶
- func RenderProgressDots(current, total int) string
- type CalendarDateChangedMsg
- type CalendarDateSelectedMsg
- type CalendarModel
- func (m *CalendarModel) GoToDate(date string)
- func (m CalendarModel) Init() tea.Cmd
- func (m CalendarModel) IsFocused() bool
- func (m CalendarModel) Month() time.Month
- func (m CalendarModel) SelectedDate() string
- func (m *CalendarModel) SetDatesWithEntries(dates []string)
- func (m *CalendarModel) SetFocused(focused bool)
- func (m CalendarModel) Update(msg tea.Msg) (CalendarModel, tea.Cmd)
- func (m CalendarModel) View() string
- func (m CalendarModel) Year() int
- type EntryCursorChangedMsg
- type EntryListModel
- func (m EntryListModel) Entries() []EntryPreview
- func (m EntryListModel) Init() tea.Cmd
- func (m EntryListModel) IsFocused() bool
- func (m *EntryListModel) SelectByDate(date string)
- func (m EntryListModel) SelectedEntry() *EntryPreview
- func (m *EntryListModel) SetEmptyMessage(msg string)
- func (m *EntryListModel) SetEntries(entries []EntryPreview)
- func (m *EntryListModel) SetFocused(focused bool)
- func (m EntryListModel) Update(msg tea.Msg) (EntryListModel, tea.Cmd)
- func (m EntryListModel) View() string
- type EntryPreview
- type EntrySelectedMsg
- type EntryViewCloseMsg
- type EntryViewModel
- func (m EntryViewModel) CurrentEntry() *EntryPreview
- func (m EntryViewModel) Init() tea.Cmd
- func (m *EntryViewModel) SetCurrentIndex(index int)
- func (m *EntryViewModel) SetEntries(entries []EntryPreview)
- func (m EntryViewModel) Update(msg tea.Msg) (EntryViewModel, tea.Cmd)
- func (m EntryViewModel) View() string
- type EntryViewQuitMsg
- type FocusedPanel
- type LogModel
- type LogViewMode
- type Mode
- type Model
- type State
- type SummaryCloseMsg
- type SummaryModel
- type SummaryQuitMsg
- type SummarySavedMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderProgressDots ¶
RenderProgressDots renders a dot-based progress indicator Example: "● ● ● ○ ○ ○ ○ ○" for question 3 of 8
Types ¶
type CalendarDateChangedMsg ¶
type CalendarDateChangedMsg struct {
Date string
}
CalendarDateChangedMsg is sent when the cursor moves to a new date
type CalendarDateSelectedMsg ¶
type CalendarDateSelectedMsg struct {
Date string
}
CalendarDateSelectedMsg is sent when a date is selected (Enter pressed)
type CalendarModel ¶
type CalendarModel struct {
// contains filtered or unexported fields
}
CalendarModel represents a single-month calendar view
func NewCalendar ¶
func NewCalendar() CalendarModel
NewCalendar creates a new calendar model for the current month
func (*CalendarModel) GoToDate ¶
func (m *CalendarModel) GoToDate(date string)
GoToDate navigates to a specific date
func (CalendarModel) IsFocused ¶
func (m CalendarModel) IsFocused() bool
IsFocused returns whether the calendar has focus
func (CalendarModel) Month ¶
func (m CalendarModel) Month() time.Month
Month returns the currently displayed month
func (CalendarModel) SelectedDate ¶
func (m CalendarModel) SelectedDate() string
SelectedDate returns the currently selected date as "YYYY-MM-DD"
func (*CalendarModel) SetDatesWithEntries ¶
func (m *CalendarModel) SetDatesWithEntries(dates []string)
SetDatesWithEntries updates the set of dates that have entries
func (*CalendarModel) SetFocused ¶
func (m *CalendarModel) SetFocused(focused bool)
SetFocused sets whether the calendar has focus
func (CalendarModel) Update ¶
func (m CalendarModel) Update(msg tea.Msg) (CalendarModel, tea.Cmd)
Update implements tea.Model
func (CalendarModel) Year ¶
func (m CalendarModel) Year() int
Year returns the currently displayed year
type EntryCursorChangedMsg ¶
type EntryCursorChangedMsg struct {
Entry EntryPreview
Index int
}
EntryCursorChangedMsg is sent when the cursor moves
type EntryListModel ¶
type EntryListModel struct {
// contains filtered or unexported fields
}
EntryListModel represents the entry preview list
func (EntryListModel) Entries ¶
func (m EntryListModel) Entries() []EntryPreview
Entries returns all entries
func (EntryListModel) IsFocused ¶
func (m EntryListModel) IsFocused() bool
IsFocused returns whether the list has focus
func (*EntryListModel) SelectByDate ¶
func (m *EntryListModel) SelectByDate(date string)
SelectByDate selects the first entry matching the given date
func (EntryListModel) SelectedEntry ¶
func (m EntryListModel) SelectedEntry() *EntryPreview
SelectedEntry returns the currently selected entry (or nil if empty)
func (*EntryListModel) SetEmptyMessage ¶
func (m *EntryListModel) SetEmptyMessage(msg string)
SetEmptyMessage sets the message shown when there are no entries
func (*EntryListModel) SetEntries ¶
func (m *EntryListModel) SetEntries(entries []EntryPreview)
SetEntries updates the list of entries
func (*EntryListModel) SetFocused ¶
func (m *EntryListModel) SetFocused(focused bool)
SetFocused sets whether the list has focus
func (EntryListModel) Update ¶
func (m EntryListModel) Update(msg tea.Msg) (EntryListModel, tea.Cmd)
Update implements tea.Model
type EntryPreview ¶
type EntryPreview struct {
Date string
EntryType storage.EntryType
Energy int
Entry storage.RitualEntry
}
EntryPreview represents a single entry in the list
type EntrySelectedMsg ¶
type EntrySelectedMsg struct {
Entry EntryPreview
Index int
}
EntrySelectedMsg is sent when an entry is selected (Enter pressed)
type EntryViewCloseMsg ¶
type EntryViewCloseMsg struct{}
EntryViewCloseMsg is sent when the user wants to close the view
type EntryViewModel ¶
type EntryViewModel struct {
// contains filtered or unexported fields
}
EntryViewModel displays a full entry in detail
func (EntryViewModel) CurrentEntry ¶
func (m EntryViewModel) CurrentEntry() *EntryPreview
CurrentEntry returns the currently displayed entry
func (*EntryViewModel) SetCurrentIndex ¶
func (m *EntryViewModel) SetCurrentIndex(index int)
SetCurrentIndex sets the currently displayed entry
func (*EntryViewModel) SetEntries ¶
func (m *EntryViewModel) SetEntries(entries []EntryPreview)
SetEntries sets the list of entries for navigation
func (EntryViewModel) Update ¶
func (m EntryViewModel) Update(msg tea.Msg) (EntryViewModel, tea.Cmd)
Update implements tea.Model
type EntryViewQuitMsg ¶
type EntryViewQuitMsg struct{}
EntryViewQuitMsg is sent when the user wants to quit entirely
type FocusedPanel ¶
type FocusedPanel int
FocusedPanel represents which panel has focus
const ( FocusCalendar FocusedPanel = iota FocusList )
type LogModel ¶
type LogModel struct {
// contains filtered or unexported fields
}
LogModel is the main log view orchestrator
type LogViewMode ¶
type LogViewMode int
LogViewMode represents the current view mode
const ( LogViewModeSplit LogViewMode = iota LogViewModeFullscreen )
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main Bubble Tea model
type SummaryModel ¶
type SummaryModel struct {
// contains filtered or unexported fields
}
SummaryModel displays a weekly summary
func NewSummary ¶
func NewSummary( s summary.WeeklySummary, reflection *storage.WeeklyReflection, streakInfo streak.StreakInfo, summaryStore *storage.WeeklySummaryStore, fromLogBrowser bool, ) SummaryModel
NewSummary creates a new summary view model
type SummaryQuitMsg ¶
type SummaryQuitMsg struct{} // Quit entirely
type SummarySavedMsg ¶
type SummarySavedMsg struct{} // Reflection was saved