view

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SortAlphanumeric = iota
	SortByTokens
)

Sort constants

Variables

This section is empty.

Functions

func NewViewCmd

func NewViewCmd() *cobra.Command

NewViewCmd creates the view command

Types

type Page

type Page interface {
	// Name returns the identifier for the page (e.g., "tree", "repo").
	Name() string
	// Keys returns the keymap for the page, to be used by the help component.
	Keys() interface{}
	// Init initializes the page model.
	Init() tea.Cmd
	// Update handles messages for the page.
	Update(tea.Msg) (Page, tea.Cmd)
	// View renders the page's UI.
	View() string
	// Focus is called when the page becomes active.
	Focus() tea.Cmd
	// Blur is called when the page loses focus.
	Blur()
	// SetSize sets the dimensions for the page.
	SetSize(width, height int)
}

Page is the interface for a full-screen view in the TUI.

func NewListPage

func NewListPage(state *sharedState) Page

func NewRulesPage

func NewRulesPage(state *sharedState) Page

func NewStatsPage

func NewStatsPage(state *sharedState) Page

func NewTreePage

func NewTreePage(state *sharedState) Page

Jump to

Keyboard shortcuts

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