ui

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorCyan    lipgloss.Color
	ColorMagenta lipgloss.Color
	ColorGreen   lipgloss.Color
	ColorRed     lipgloss.Color
	ColorYellow  lipgloss.Color
	ColorDim     lipgloss.Color

	TitleStyle     lipgloss.Style
	SubtitleStyle  lipgloss.Style
	DimStyle       lipgloss.Style
	ActiveStyle    lipgloss.Style
	InactiveStyle  lipgloss.Style
	SeparatorStyle lipgloss.Style
	DescStyle      lipgloss.Style
	SuccessStyle   lipgloss.Style
	ErrorStyle     lipgloss.Style
	WarnStyle      lipgloss.Style
	BoxStyle       lipgloss.Style
)
View Source
var Version = "dev"

Version is set at build time via ldflags by GoReleaser. Falls back to "dev" when built locally without ldflags.

Functions

func ActiveTheme added in v1.2.0

func ActiveTheme() string

ActiveTheme returns the currently active theme name.

func Banner() string

func CertBox

func CertBox(width int, lines ...string) string

func CheckUpdate

func CheckUpdate() string

CheckUpdate queries the GitHub API for the latest release. Returns the update message to display, or empty string if up to date. Never blocks longer than 2 seconds; errors are silently ignored.

func ForceTheme added in v1.2.0

func ForceTheme(name string)

ForceTheme overrides autodetection. Accepts "dark" or "light". Any other value is ignored.

func OpenSSLVersion

func OpenSSLVersion() string

func RenderHelp added in v1.3.0

func RenderHelp(title string, sections []HelpSection) string

RenderHelp builds a bordered help box from sections.

Usage:

if m.showHelp {
    return ui.RenderHelp("Inspect — Help", []ui.HelpSection{...})
}

func ResultBox

func ResultBox(success bool, title string, lines ...string) string

Types

type FilePicker

type FilePicker struct {
	Prompt string

	Selected string
	Done     bool
	// contains filtered or unexported fields
}

func NewAllFilePicker

func NewAllFilePicker(prompt string) FilePicker

func NewCertFilePicker

func NewCertFilePicker(prompt string) FilePicker

func NewCertOnlyPicker

func NewCertOnlyPicker(prompt string) FilePicker

func NewKeyPicker

func NewKeyPicker(prompt string) FilePicker

func NewPfxFilePicker

func NewPfxFilePicker(prompt string) FilePicker

func (FilePicker) Init

func (fp FilePicker) Init() tea.Cmd

func (FilePicker) Update

func (fp FilePicker) Update(msg tea.Msg) (FilePicker, tea.Cmd)

func (FilePicker) View

func (fp FilePicker) View() string

type HelpEntry added in v1.3.0

type HelpEntry struct {
	Key  string
	Desc string
}

HelpEntry is a single (key, description) pair in a help overlay.

type HelpSection added in v1.3.0

type HelpSection struct {
	Title   string
	Entries []HelpEntry
}

HelpSection groups related help entries under a heading.

func CommonHelp added in v1.3.0

func CommonHelp() HelpSection

CommonHelp returns entries shared across every screen.

Jump to

Keyboard shortcuts

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