ui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Styles using Catppuccin Mocha palette
	AccentStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Blue().Hex))

	TextStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Text().Hex))

	TitleStyle = AccentStyle.Bold(true)

	LogoStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Text().Hex)).
				Bold(true)

	SelectedStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(mocha.Text().Hex)).
					Bold(true)

	NormalStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Subtext0().Hex))

	DimStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Overlay0().Hex))

	CompletedStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(mocha.Subtext0().Hex))

	ErrorStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Red().Hex))

	SuccessStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color(mocha.Green().Hex))

	BulletStyle = AccentStyle.Bold(true)

	LineStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color(mocha.Surface1().Hex))

	ContainerStyle = lipgloss.NewStyle().
					Padding(1, 2)

	GreenStyle = lipgloss.NewStyle().Foreground(lipgloss.Color(mocha.Green().Hex))

	YellowStyle = lipgloss.NewStyle().Foreground(lipgloss.Color(mocha.Yellow().Hex))

	RedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color(mocha.Red().Hex))
)

Functions

func UpdateOnInit

func UpdateOnInit() tea.Cmd

Types

type ActionModel

type ActionModel struct {
	Actions        []string
	SelectedAction string
}

func (*ActionModel) GetActions

func (a *ActionModel) GetActions() []string

func (*ActionModel) GetSelectedAction

func (a *ActionModel) GetSelectedAction() string

func (*ActionModel) SetSelectedAction

func (a *ActionModel) SetSelectedAction(s string)

type BranchModel

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

func (*BranchModel) GetActions

func (b *BranchModel) GetActions() []string

func (*BranchModel) GetSelectedAction

func (b *BranchModel) GetSelectedAction() string

func (*BranchModel) SetSelectedAction

func (b *BranchModel) SetSelectedAction(s string)

type CommitModel

type CommitModel struct {
	Actions        []string
	SelectedAction string
}

func (*CommitModel) GetActions

func (c *CommitModel) GetActions() []string

func (*CommitModel) GetSelectedAction

func (c *CommitModel) GetSelectedAction() string

func (*CommitModel) SetSelectedAction

func (c *CommitModel) SetSelectedAction(s string)

type ConfigModel

type ConfigModel struct {
	Accent  string
	Flavor  string
	Flavors []string
	Accents []string
}

type Model

type Model struct {
	CurrentStep Step
	Loading     bool
	Selected    int
	ActionModel ActionModel
	BranchModel BranchModel
	CommitModel CommitModel
	RemoteModel RemoteModel
	TagModel    TagModel
	ConfigModel ConfigModel
	Spinner     spinner.Model
	Level       int
	Output      []string
	Err         string
	Success     string
}

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
}

func (*RemoteModel) GetActions

func (r *RemoteModel) GetActions() []string

func (*RemoteModel) GetSelectedAction

func (r *RemoteModel) GetSelectedAction() string

func (*RemoteModel) SetSelectedAction

func (r *RemoteModel) SetSelectedAction(s string)

type Step

type Step int
const (
	StepLoad Step = iota
	StepAction
	StepBranchAction
	StepBranchSelect
	StepCommit
	StepTag
	StepTagSelect
	StepRemote
	StepChanges
	StepOptions
)

type TagModel

type TagModel struct {
	Actions        []string
	SelectedAction string
	Options        []string
	Selected       string
}

func (*TagModel) GetActions

func (t *TagModel) GetActions() []string

func (*TagModel) GetSelectedAction

func (t *TagModel) GetSelectedAction() string

func (*TagModel) SetSelectedAction

func (t *TagModel) SetSelectedAction(s string)

Jump to

Keyboard shortcuts

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