components

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Primary = lipgloss.Color("#00D7FF")
	Success = lipgloss.Color("#10B981")
	Warning = lipgloss.Color("#F59E0B")
	Error   = lipgloss.Color("#EF4444")
	Muted   = lipgloss.Color("#6B7280")
	Border  = lipgloss.Color("#374151")

	HeaderStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(Primary).
				BorderStyle(lipgloss.RoundedBorder()).
				BorderForeground(Border).
				Padding(0, 2).
				Align(lipgloss.Center)

	ContentStyle = lipgloss.NewStyle().
					BorderStyle(lipgloss.RoundedBorder()).
					BorderForeground(Border).
					Padding(1, 2)

	TitleStyle = lipgloss.NewStyle().
				Bold(true).
				Foreground(Primary)

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

	ListItemSelectedStyle = lipgloss.NewStyle().
							Foreground(Primary).
							Bold(true).
							PaddingLeft(1)

	StatusConnected = lipgloss.NewStyle().
					Foreground(Success).
					Bold(true)

	StatusDisconnected = lipgloss.NewStyle().
						Foreground(Error).
						Bold(true)

	StatusMuted = lipgloss.NewStyle().
				Foreground(Muted)

	FooterStyle = lipgloss.NewStyle().
				Foreground(Muted).
				Padding(0, 2)

	HelpKeyStyle = lipgloss.NewStyle().
					Foreground(Primary).
					Bold(true)

	HelpDescStyle = lipgloss.NewStyle().
					Foreground(Muted)

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

	LogVerbose = lipgloss.NewStyle().Foreground(Muted)
	LogDebug   = lipgloss.NewStyle().Foreground(Primary)
	LogInfo    = lipgloss.NewStyle().Foreground(Success)
	LogWarn    = lipgloss.NewStyle().Foreground(Warning)
	LogError   = lipgloss.NewStyle().Foreground(Error)
	LogFatal   = lipgloss.NewStyle().Foreground(Error).Bold(true)

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

Functions

func DeviceList

func DeviceList(devices []adb.Device, cursor int) string

func FileList

func FileList(files []adb.FileEntry, cursor int) string

func Help

func Help(key, desc string) string

func KeyValueList

func KeyValueList(rows []KeyValueRow) string

func RenderHeader

func RenderHeader(appState *state.AppState, screenName string) string

func RenderLayout

func RenderLayout(state *state.AppState, title, content, footer string) string

func RenderLayoutWithScrollableSection

func RenderLayoutWithScrollableSection(state *state.AppState, props LayoutWithScrollProps) string

func RenderNoDevice

func RenderNoDevice(state *state.AppState, title string) string

func RenderOverlay

func RenderOverlay(base, overlay string, s *state.AppState) string

func UpdateViewport

func UpdateViewport(screenTitle string, msg tea.Msg) tea.Cmd

func ViewportEnsureVisible

func ViewportEnsureVisible(screenTitle string, line int)

func ViewportGotoBottom

func ViewportGotoBottom(screenTitle string)

func ViewportGotoTop

func ViewportGotoTop(screenTitle string)

Types

type ConfirmNoMsg

type ConfirmNoMsg struct{}

type ConfirmPrompt

type ConfirmPrompt struct {
	Visible bool
	Message string
}

func (*ConfirmPrompt) Hide

func (c *ConfirmPrompt) Hide()

func (*ConfirmPrompt) Show

func (c *ConfirmPrompt) Show(message string)

func (*ConfirmPrompt) Update

func (c *ConfirmPrompt) Update(msg tea.Msg) tea.Cmd

func (*ConfirmPrompt) View

func (c *ConfirmPrompt) View() string

type ConfirmYesMsg

type ConfirmYesMsg struct{}

type FormCancelMsg

type FormCancelMsg struct{}

type FormField

type FormField struct {
	Label string
	Value string
}

type FormModal

type FormModal struct {
	Visible bool
	Title   string
	Fields  []FormField
	Cursor  int
}

func (*FormModal) Hide

func (f *FormModal) Hide()

func (*FormModal) Show

func (f *FormModal) Show(title string, fields []FormField)

func (*FormModal) Update

func (f *FormModal) Update(msg tea.Msg) tea.Cmd

func (*FormModal) View

func (f *FormModal) View() string

type FormSubmitMsg

type FormSubmitMsg struct {
	Values []string
}

type KeyValueRow

type KeyValueRow struct {
	Key   string
	Value string
}

type LayoutWithScrollProps

type LayoutWithScrollProps struct {
	Title             string
	StaticContent     string
	ScrollableContent string
	Footer            string
}

type Toast

type Toast struct {
	Message string
	IsError bool
	Visible bool
}

func ShowToast

func ShowToast(msg string, isError bool, d time.Duration) (Toast, tea.Cmd)

func (*Toast) Update

func (t *Toast) Update(msg tea.Msg)

func (*Toast) View

func (t *Toast) View() string

Jump to

Keyboard shortcuts

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