tui

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigStyles

type ConfigStyles struct {
	LabelStyle lipgloss.Style
	TextStyle  lipgloss.Style
}

type Controller

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

Controller implements the UI for xcoder.

func New

func New(queue Queue, cfg pipeline.Configuration) Controller

New returns a new Controller for the provided Queue.

func (Controller) Init

func (c Controller) Init() tea.Cmd

Init implements the tea.Model interface. It initializes the controller and all subcomponents.

func (Controller) LogWriter added in v0.6.1

func (c Controller) LogWriter() io.Writer

LogWriter returns the io.Writer for the log pane. Calling applications use this to direct log/slog output to the screen.

func (Controller) Update

func (c Controller) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements the tea.Model interface. It updates the controller and all subcomponents.

func (Controller) View

func (c Controller) View() string

View implements the tea.Model interface. It renders all subcomponents.

type ControllerKeyMap

type ControllerKeyMap struct {
	Quit      key.Binding
	Activate  key.Binding
	Convert   key.Binding
	FullPath  key.Binding
	ShowLogs  key.Binding
	CloseLogs key.Binding
}

func (ControllerKeyMap) FullHelp

func (k ControllerKeyMap) FullHelp() [][]key.Binding

func (ControllerKeyMap) ShortHelp

func (k ControllerKeyMap) ShortHelp() []key.Binding

type FilterKeyMap

type FilterKeyMap struct {
	ShowSkippedFiles   key.Binding
	ShowRejectedFiles  key.Binding
	ShowConvertedFiles key.Binding
}

func (FilterKeyMap) FullHelp

func (f FilterKeyMap) FullHelp() [][]key.Binding

func (FilterKeyMap) ShortHelp

func (f FilterKeyMap) ShortHelp() []key.Binding

type Queue

type Queue interface {
	Stats() map[pipeline.Status]int
	All() iter.Seq[*pipeline.WorkItem]
	Queue(*pipeline.WorkItem)
	SetActive(bool)
	Active() bool
}

Queue is the interface for a pipeline.Queue.

type StatusStyles

type StatusStyles struct {
	Main       lipgloss.Style
	Processing lipgloss.Style
}

type Styles

type Styles struct {
	Config      ConfigStyles
	Help        helper.Styles
	TableStyle  table.FilterTableStyles
	FrameStyle  frame.Styles
	Status      StatusStyles
	MediaFilter lipgloss.Style
}

func DefaultStyles

func DefaultStyles() Styles

Jump to

Keyboard shortcuts

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