tui

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 9 Imported by: 0

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

func (m Model) Init() tea.Cmd

Init initializes the model and returns any initial commands to run. Implements the tea.Model interface.

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles incoming messages and updates the model state accordingly. Implements the tea.Model interface.

func (Model) View

func (m Model) View() string

View renders the current state of the model as a string. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL