tui

package
v0.0.0-...-fe48d68 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlanModule

type PlanModule struct {
	// contains filtered or unexported fields
}

PlanModule provides CRUD operations for learning plans.

func NewPlanModule

func NewPlanModule(service *plan.Service) *PlanModule

NewPlanModule returns a plan management module.

func (*PlanModule) ID

func (m *PlanModule) ID() string

ID satisfies app.Module.

func (*PlanModule) Init

func (m *PlanModule) Init() tea.Cmd

Init satisfies tea.Model.

func (*PlanModule) Shortcuts

func (m *PlanModule) Shortcuts() []app.Shortcut

Shortcuts satisfies app.Module.

func (*PlanModule) Title

func (m *PlanModule) Title() string

Title satisfies app.Module.

func (*PlanModule) Update

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

Update satisfies tea.Model.

func (*PlanModule) View

func (m *PlanModule) View() string

View satisfies tea.Model.

type SessionProvider

type SessionProvider interface {
	ListAll(ctx context.Context) ([]*session.Session, error)
}

SessionProvider supplies session data for statistics.

type StatsModel

type StatsModel struct {
	// contains filtered or unexported fields
}

StatsModel is the Bubble Tea module for the stats dashboard.

func NewStatsModule

func NewStatsModule(service *stats.Service, sessionService SessionProvider, timeRange stats.TimeRange) *StatsModel

NewStatsModule constructs a stats module backed by the provided services.

func (*StatsModel) ID

func (m *StatsModel) ID() string

ID returns the module identifier.

func (*StatsModel) Init

func (m *StatsModel) Init() tea.Cmd

Init initializes the model.

func (*StatsModel) SetAllPlanStats

func (m *StatsModel) SetAllPlanStats(planStats []stats.PlanStats)

SetAllPlanStats sets the list of all plan statistics for the plan list view.

func (*StatsModel) SetSessions

func (m *StatsModel) SetSessions(sessions []*session.Session)

SetSessions sets the list of sessions for the session history view.

func (*StatsModel) Shortcuts

func (m *StatsModel) Shortcuts() []app.Shortcut

Shortcuts exposes module-specific keyboard hints for the shell footer.

func (*StatsModel) Title

func (m *StatsModel) Title() string

Title is displayed in the navigation bar.

func (*StatsModel) Update

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

Update handles messages and updates the model.

func (*StatsModel) View

func (m *StatsModel) View() string

View renders the TUI based on current view state.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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