ui

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ColorPrimary   = lipgloss.Color("#00b4d8")
	ColorSecondary = lipgloss.Color("#90e0ef")
	ColorSuccess   = lipgloss.Color("#52b788")
	ColorWarning   = lipgloss.Color("#f77f00")
	ColorError     = lipgloss.Color("#d62828")
	ColorMuted     = lipgloss.Color("#6c757d")
	ColorBg        = lipgloss.Color("#0a0e27")
	ColorFg        = lipgloss.Color("#ffffff")

	BaseStyle = lipgloss.NewStyle().
				Background(ColorBg).
				Foreground(ColorFg)

	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorPrimary).
				Background(ColorBg).
				Padding(0, 1)

	HeaderStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(ColorFg).
				Background(ColorPrimary).
				Padding(0, 1).
				Width(100)

	TabStyle = lipgloss.NewStyle().
				Padding(0, 2).
				Border(lipgloss.RoundedBorder(), true, true, false, true).
				BorderForeground(ColorMuted)

	ActiveTabStyle = TabStyle.Copy().
					Bold(true).
					BorderForeground(ColorPrimary).
					Foreground(ColorPrimary)

	ListItemStyle = lipgloss.NewStyle().
					PaddingLeft(2).
					PaddingRight(2)

	SelectedItemStyle = ListItemStyle.Copy().
						Foreground(ColorBg).
						Background(ColorPrimary)

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

	StatusInactiveStyle = lipgloss.NewStyle().
						Foreground(ColorError).
						Bold(true)

	StatusUnknownStyle = lipgloss.NewStyle().
						Foreground(ColorMuted)

	InfoBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(ColorSecondary).
					Padding(1, 2).
					Margin(1, 0)

	ErrorBoxStyle = InfoBoxStyle.Copy().
					BorderForeground(ColorError)

	SuccessBoxStyle = InfoBoxStyle.Copy().
					BorderForeground(ColorSuccess)

	LogStyle = lipgloss.NewStyle().
				Foreground(ColorMuted).
				PaddingLeft(1)

	HelpStyle = lipgloss.NewStyle().
				Foreground(ColorMuted).
				Padding(1, 0)

	InputStyle = lipgloss.NewStyle().
				Border(lipgloss.RoundedBorder()).
				BorderForeground(ColorSecondary).
				Padding(0, 1)

	FocusedInputStyle = InputStyle.Copy().
						BorderForeground(ColorPrimary)

	ButtonStyle = lipgloss.NewStyle().
				Foreground(ColorFg).
				Background(ColorSecondary).
				Padding(0, 2).
				Border(lipgloss.RoundedBorder()).
				BorderForeground(ColorSecondary)

	FocusedButtonStyle = ButtonStyle.Copy().
						Background(ColorPrimary).
						BorderForeground(ColorPrimary).
						Bold(true)

	SpinnerStyle = lipgloss.NewStyle().
					Foreground(ColorPrimary)
)

Functions

func RenderStatus

func RenderStatus(status string) string

func TruncateString

func TruncateString(s string, maxLen int) string

Types

type ConfigView

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

func NewConfigView

func NewConfigView(configPath string) *ConfigView

func (*ConfigView) Init

func (v *ConfigView) Init() tea.Cmd

func (*ConfigView) Update

func (v *ConfigView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ConfigView) View

func (v *ConfigView) View() string

type HistoryView

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

func NewHistoryView

func NewHistoryView(service runner.Service) *HistoryView

func (*HistoryView) Init

func (v *HistoryView) Init() tea.Cmd

func (*HistoryView) Update

func (v *HistoryView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*HistoryView) View

func (v *HistoryView) View() string

type LogsView

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

func NewLogsView

func NewLogsView(service runner.Service) *LogsView

func (*LogsView) Init

func (v *LogsView) Init() tea.Cmd

func (*LogsView) SetRunner

func (v *LogsView) SetRunner(name string)

func (*LogsView) Update

func (v *LogsView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*LogsView) View

func (v *LogsView) View() string

type RunnersView

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

func NewRunnersView

func NewRunnersView(service runner.Service) *RunnersView

func (*RunnersView) GetSelectedRunner

func (v *RunnersView) GetSelectedRunner() *runner.Runner

func (*RunnersView) Init

func (v *RunnersView) Init() tea.Cmd

func (*RunnersView) Update

func (v *RunnersView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*RunnersView) View

func (v *RunnersView) View() string

type SystemView

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

func NewSystemView

func NewSystemView(service runner.Service) *SystemView

func (*SystemView) Init

func (v *SystemView) Init() tea.Cmd

func (*SystemView) Update

func (v *SystemView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*SystemView) View

func (v *SystemView) View() string

Jump to

Keyboard shortcuts

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