ui

package
v0.0.0-...-b5ec48c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Base styles
	BaseStyle = lipgloss.NewStyle().
				Background(bgColor).
				Foreground(textColor)

	// Title styles
	TitleStyle = lipgloss.NewStyle().
				Foreground(primaryColor).
				Bold(true).
				MarginBottom(1).
				PaddingLeft(2).
				PaddingRight(2)

	// Subtitle style
	SubtitleStyle = lipgloss.NewStyle().
					Foreground(secondaryColor).
					Italic(true).
					MarginLeft(1).
					AlignVertical(lipgloss.Center)

	// Menu styles
	MenuStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(secondaryColor).
				Padding(1).
				MarginRight(2).
				Width(40)

	SelectedItemStyle = lipgloss.NewStyle().
						Foreground(textColor).
						Background(primaryColor).
						Bold(true).
						Padding(0, 1).
						Width(38)

	ItemStyle = lipgloss.NewStyle().
				Foreground(dimTextColor).
				Width(38)

	// Project list styles
	ProjectListStyle = lipgloss.NewStyle().
						Border(lipgloss.RoundedBorder()).
						BorderForeground(secondaryColor).
						Padding(1).
						Width(60)

	SelectedProjectStyle = lipgloss.NewStyle().
							Foreground(textColor).
							Background(primaryColor).
							Bold(true).
							Padding(0, 1).
							Width(58)

	ProjectStyle = lipgloss.NewStyle().
					Foreground(dimTextColor).
					Width(58)

	// Info styles
	InfoStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(secondaryColor).
				Padding(1).
				Width(60)

	InfoTitleStyle = lipgloss.NewStyle().
					Foreground(primaryColor).
					Bold(true).
					Width(16)

	InfoValueStyle = lipgloss.NewStyle().
					Foreground(textColor).
					Width(42)

	// Status styles
	StatusStyle = lipgloss.NewStyle().
				Foreground(dimTextColor).
				Italic(true)

	SuccessStyle = lipgloss.NewStyle().
					Foreground(accentColor).
					Bold(true)

	WarningStyle = lipgloss.NewStyle().
					Foreground(warningColor).
					Bold(true)

	ErrorStyle = lipgloss.NewStyle().
				Foreground(errorColor).
				Bold(true)

	// Input styles
	InputStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(secondaryColor).
				Padding(1)

	InputLabelStyle = lipgloss.NewStyle().
					Foreground(primaryColor).
					Bold(true)

	// Help styles
	HelpStyle = lipgloss.NewStyle().
				Foreground(dimTextColor).
				Italic(true)

	// Fancy box styles with double borders
	FancyBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.DoubleBorder()).
					BorderForeground(highlightColor).
					Padding(1).
					Width(60)

	// Highlight text style
	HighlightStyle = lipgloss.NewStyle().
					Foreground(highlightColor).
					Bold(true)

	// Version badge style
	VersionBadgeStyle = lipgloss.NewStyle().
						Foreground(textColor).
						Background(secondaryColor).
						Padding(0, 1).
						AlignVertical(lipgloss.Center)
)

Functions

func GetCompactLogo() string

GetCompactLogo returns a styled compact logo

func GetLogo() string

GetLogo returns a styled logo

Types

type AppState

type AppState int

AppState represents the current state of the application

const (
	StateMainMenu AppState = iota
	StateFirstRun
	StateProjectList
	StateProjectDetail
	StateNewProject
	StateLoading
)

type KeyMap

type KeyMap struct {
	Up     key.Binding
	Down   key.Binding
	Select key.Binding
	Back   key.Binding
	Quit   key.Binding
	Scan   key.Binding
}

KeyMap defines the keybindings for the application

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default keybindings

type Model

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

Model represents the main application model

func NewModel

func NewModel(cfg *config.Config) Model

NewModel creates a new application model

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 updates to the model

func (Model) View

func (m Model) View() string

View renders the UI

Jump to

Keyboard shortcuts

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