components

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderGradientText

func RenderGradientText(text string, startHex string, endHex string) string

RenderGradientText colors each character of text with a gradient transitioning from startHex to endHex (e.g., "#5EC6F6" to "#376FE9"). The gradient spans the full rune-length of the input text.

func RenderHeader

func RenderHeader(title string, containerWidth int, totalHorizontalPadding int, pattern string) string

RenderHeader renders a single-line header like "◇ Title /////" that fills the full content width of the parent container, never wrapping. It clamps to the given width. The containerWidth should be the container's content width; the function accounts for horizontal padding via the totalHorizontalPadding value passed by the caller.

func RenderHeaderActive

func RenderHeaderActive(title string, containerWidth int, totalHorizontalPadding int, pattern string) string

RenderHeaderActive renders the same header but highlights the title section with the primary color to denote focus/selection.

func RenderNetwork

func RenderNetwork(name, driver string, highlight bool) string

RenderNetwork renders a single-line network entry formatted as:

name - driver

Styling follows the Simple component: - the prefix ("name - ") uses theme.FgHalfMuted - the driver uses theme.FgMuted and is italic

func RenderSimple

func RenderSimple(key, value string) string

RenderSimple renders a single line in the format "key: value" with styles: - the "key: " part uses theme.FgHalfMuted - the value uses theme.FgMuted and is italic It returns the styled string; callers decide placement and width concerns.

func RenderThemeGradient

func RenderThemeGradient(text string) string

RenderThemeGradient colors each character using the dashboard gradient colors.

func RenderVolume

func RenderVolume(name, mountPath, detail string, highlight bool) string

RenderVolume renders a simple volume block with the following format:

name
├ /mnt/path
└ local

Colors follow the same pattern used in stack list items: title and tree in theme.FgBase; secondary text in theme.FgHalfMuted; the final line is italic.

Types

type LogsPager

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

LogsPager is a thin wrapper around a viewport pager that we can embed inside the dashboard center column.

func NewLogsPager

func NewLogsPager() LogsPager

func (*LogsPager) SetContent

func (p *LogsPager) SetContent(content string)

func (*LogsPager) SetSize

func (p *LogsPager) SetSize(width, height int)

func (LogsPager) Update

func (p LogsPager) Update(msg tea.Msg) (LogsPager, tea.Cmd)

func (LogsPager) View

func (p LogsPager) View() string

type StackItem

type StackItem struct {
	TitleText     string
	Service       string
	ContainerName string
	Containers    []string
	Status        string
	StatusKind    string // success | warning | error | unknown
	FilterText    string
}

StackItem represents an item in the stacks list (formerly projectItem).

func (StackItem) Description

func (i StackItem) Description() string

func (StackItem) FilterValue

func (i StackItem) FilterValue() string

func (StackItem) Title

func (i StackItem) Title() string

type StacksDelegate

type StacksDelegate struct{}

StacksDelegate renders stack items with tree-like formatting.

func (StacksDelegate) Height

func (d StacksDelegate) Height() int

func (StacksDelegate) Render

func (d StacksDelegate) Render(w io.Writer, m list.Model, index int, item list.Item)

func (StacksDelegate) Spacing

func (d StacksDelegate) Spacing() int

func (StacksDelegate) Update

func (d StacksDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd

Jump to

Keyboard shortcuts

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