Documentation
¶
Overview ¶
Package tui implements the terminal user interface for displaying and interacting with notifications. It uses the Bubble Tea framework for building the interactive terminal application.
Package tui implements the terminal user interface for displaying and interacting with notifications. It uses the Bubble Tea framework for building the interactive terminal application.
Package tui implements the terminal user interface for displaying and interacting with notifications. It uses the Bubble Tea framework for building the interactive terminal application.
Package tui implements the terminal user interface for displaying and interacting with notifications. It uses the Bubble Tea framework for building the interactive terminal application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the application state for the terminal UI. It implements the tea.Model interface from Bubble Tea.
func NewModel ¶
func NewModel(initial []model.Notification, refreshFn RefreshFunc) Model
NewModel creates and initializes a new TUI model with the given notifications. The refreshFn is called when the user requests to reload the notification list.
func (Model) Init ¶
Init initializes the model and returns any initial commands to run. Implements the tea.Model interface.
type RefreshFunc ¶
type RefreshFunc func() ([]model.Notification, error)
RefreshFunc is a function that retrieves the latest notifications. It is called when the user requests a refresh of the notification list.