ui

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Colors
	ColorPrimary   = lipgloss.Color("#7D56F4")
	ColorSecondary = lipgloss.Color("#FAFAFA")
	ColorText      = lipgloss.Color("#E0E0E0")
	ColorSubText   = lipgloss.Color("#9E9E9E")

	ColorSuccess = lipgloss.Color("#04B575") // Green
	ColorWarning = lipgloss.Color("#FFD93D") // Yellow
	ColorError   = lipgloss.Color("#FF6B6B") // Red
	ColorInfo    = lipgloss.Color("#3B8ED0") // Blue

	// Styles
	StyleTitle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorSecondary).
				Background(ColorPrimary).
				Padding(0, 1).
				MarginBottom(1)

	StylePanel = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(lipgloss.Color("62")).
				Padding(0, 0).
				MarginRight(0)

	StyleHeader = lipgloss.NewStyle().
				Bold(true).
				Foreground(lipgloss.Color("86")) // Cyan-ish

	StyleSelected = lipgloss.NewStyle().
					Foreground(ColorSuccess).
					Bold(true)

	StyleNormal = lipgloss.NewStyle().
				Foreground(ColorText)

	StyleDim = lipgloss.NewStyle().
				Foreground(ColorSubText)
)

Functions

This section is empty.

Types

type BranchesModel

type BranchesModel struct {
	Branches []git.Branch
	Selected int
	Active   bool // Whether this panel is currently active/focused
}

func NewBranchesModel

func NewBranchesModel(branches []git.Branch) BranchesModel

func (*BranchesModel) Next

func (m *BranchesModel) Next()

func (*BranchesModel) Previous

func (m *BranchesModel) Previous()

func (BranchesModel) View

func (m BranchesModel) View(width int, loading bool, checkingOut string, spinner int) string

type CommitsModel

type CommitsModel struct {
	Commits []git.Commit
}

func NewCommitsModel

func NewCommitsModel(commits []git.Commit) CommitsModel

func (CommitsModel) View

func (m CommitsModel) View(width int) string

type FocusArea

type FocusArea int
const (
	FocusNone FocusArea = iota
	FocusBranches
)

type Model

type Model struct {
	Config          *config.Config
	RepoInfo        *git.RepoInfo
	BranchesModel   BranchesModel
	CommitsModel    CommitsModel
	WorkDirModel    WorkDirModel
	StashModel      StashModel
	StatsModel      StatsModel
	Viewport        viewport.Model
	Quitting        bool
	Width           int
	Height          int
	Loading         bool
	ShowHelp        bool
	Focus           FocusArea
	InspectedBranch string // Branch currently being viewed/inspected
	StatusMessage   string
	Spinner         int    // For checkout animation
	CheckingOut     string // Name of branch being checked out
	RefreshTries    int
}

func NewModel

func NewModel(info *git.RepoInfo, cfg *config.Config) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) RenderMainContent

func (m Model) RenderMainContent() string

func (Model) Update

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

func (Model) View

func (m Model) View() string

type StashModel

type StashModel struct {
	Entries []git.StashEntry
}

func NewStashModel

func NewStashModel(entries []git.StashEntry) StashModel

func (StashModel) View

func (m StashModel) View(width int) string

type StatsModel

type StatsModel struct {
	Stats *stats.ProjectStats
}

func NewStatsModel

func NewStatsModel(s *stats.ProjectStats) StatsModel

func (StatsModel) View

func (m StatsModel) View(width int) string

type WorkDirModel

type WorkDirModel struct {
	Status *git.WorkingDirStatus
}

func NewWorkDirModel

func NewWorkDirModel(status *git.WorkingDirStatus) WorkDirModel

func (WorkDirModel) View

func (m WorkDirModel) View(width int) string

Jump to

Keyboard shortcuts

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