ui

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Global style variables - will be updated by UpdateStyles
	AccentStyle    lipgloss.Style
	TextStyle      lipgloss.Style
	TitleStyle     lipgloss.Style
	LogoStyle      lipgloss.Style
	SelectedStyle  lipgloss.Style
	NormalStyle    lipgloss.Style
	DimStyle       lipgloss.Style
	CompletedStyle lipgloss.Style
	ErrorStyle     lipgloss.Style
	SuccessStyle   lipgloss.Style
	BulletStyle    lipgloss.Style
	LineStyle      lipgloss.Style
	ContainerStyle lipgloss.Style
	GreenStyle     lipgloss.Style
	YellowStyle    lipgloss.Style
	RedStyle       lipgloss.Style
)

Functions

func InitializeStyles added in v0.4.0

func InitializeStyles() error

InitializeStyles initializes styles with default or loaded config

func UpdateOnInit

func UpdateOnInit() tea.Cmd

func UpdateStyles added in v0.4.0

func UpdateStyles(flavor catppuccingo.Flavor, accentColor catppuccingo.Color)

UpdateStyles updates all styles based on the provided config

func UpdateStylesByConfig added in v0.6.0

func UpdateStylesByConfig(cfg *config.Config)

Types

type ActionModel

type ActionModel struct {
	Actions        []string
	SelectedAction string
}

type BranchModel

type BranchModel struct {
	Actions        []string
	SelectedAction string
	Branches       []string
	SelectedBranch string
	Options        []string
	SelectedOption string
	Input          string
}

type CommitModel

type CommitModel struct {
	Actions        []string
	SelectedAction string
}

type ConfigModel

type ConfigModel struct {
	Actions        []string
	SelectedAction string
	Flavors        []string
	SelectedFlavor string
	Accents        []string
	SelectedAccent string
}

type Model

type Model struct {
	CurrentStep   Step
	Loading       bool
	Selected      int
	ActionModel   ActionModel
	BranchModel   BranchModel
	CommitModel   CommitModel
	RemoteModel   RemoteModel
	TagModel      TagModel
	ConfigModel   ConfigModel
	CurrentConfig *config.Config
	Spinner       spinner.Model
	Level         int
	Output        []string
	Err           string
	Success       string
	StartAt       string // allows jumping directly to a specific flow when the UI loads
	StartAtLevel  int
}

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

View renders the entire UI based on the current model state.

type RemoteModel

type RemoteModel struct {
	Actions        []string
	SelectedAction string
	Options        []string
	SelectedOption string
	NameInput      string
	UrlInput       string
}

type Step

type Step int
const (
	StepLoad Step = iota
	StepAction

	StepBranchAction
	StepBranchSelect
	StepBranchCreate
	StepBranchInput

	StepCommit

	StepTag
	StepTagSelect
	StepTagAdd
	StepTagInput

	StepRemote
	StepRemoteSelect
	StepRemoteNameInput
	StepRemoteUrlInput

	StepChanges

	StepOptions
	StepOptionsFlavorSelect
	StepOptionsAccentSelect
)

type TagModel

type TagModel struct {
	Actions        []string
	SelectedAction string
	Options        []string
	SelectedOption string
	AddOptions     []string
	SelectedAddTag string
	CurrentTag     string
	ManualInput    string
}

Jump to

Keyboard shortcuts

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