tui

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string

Version exposes the application version for use across the TUI.

Functions

func Run

func Run(mode string, directories []string) error

Run starts the TUI application

Types

type Mode

type Mode struct {
	ID            ModeID
	DisplayString string
	CommandString string
}

Mode represents the operation mode

type ModeID

type ModeID string

ModeID identifies the mode

const (
	PullMode   ModeID = "pull"
	MergeMode  ModeID = "merge"
	RebaseMode ModeID = "rebase"
	PushMode   ModeID = "push"
)

type Model

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

Model represents the main application state for Bubbletea

func New

func New(mode string, directories []string) *Model

New creates a new Model with the given configuration

func (*Model) Init

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

Init initializes the model

func (*Model) Update

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

Update handles all messages and updates the model

func (*Model) View

func (m *Model) View() string

View renders the UI

type SidePanelType

type SidePanelType int

SidePanelType represents which side panel is active

const (
	NonePanel SidePanelType = iota
	BranchPanel
	RemotePanel
	RemoteBranchPanel
	CommitPanel
	StashPanel
	StatusPanel
)

type Styles

type Styles struct {
	App                lipgloss.Style
	Title              lipgloss.Style
	StatusBarPull      lipgloss.Style
	StatusBarMerge     lipgloss.Style
	StatusBarRebase    lipgloss.Style
	StatusBarPush      lipgloss.Style
	StatusBarDirty     lipgloss.Style
	StatusBarError     lipgloss.Style
	Help               lipgloss.Style
	List               lipgloss.Style
	ListItem           lipgloss.Style
	SelectedItem       lipgloss.Style
	DirtySelectedItem  lipgloss.Style
	CommonSelectedItem lipgloss.Style
	FailedSelectedItem lipgloss.Style
	QueuedItem         lipgloss.Style
	WorkingItem        lipgloss.Style
	SuccessItem        lipgloss.Style
	FailedItem         lipgloss.Style
	DisabledItem       lipgloss.Style
	BranchInfo         lipgloss.Style
	KeyBinding         lipgloss.Style
	Panel              lipgloss.Style
	PanelTitle         lipgloss.Style
	Error              lipgloss.Style
	TableBorder        lipgloss.Style
}

Styles holds all lipgloss styles for the UI

func DefaultStyles

func DefaultStyles() *Styles

DefaultStyles returns the default style set

type ViewType

type ViewType int

ViewType represents the current view mode

const (
	OverviewView ViewType = iota
	FocusView
)

Jump to

Keyboard shortcuts

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