ui

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCancelled = fmt.Errorf("selection cancelled")

ErrCancelled is returned when the user cancels the selection.

Functions

func Confirm

func Confirm(message string) (bool, error)

Confirm shows a yes/no prompt. Defaults to no.

func DeduplicateConfigs added in v1.0.0

func DeduplicateConfigs(configs []*devcontainer.Config) []*devcontainer.Config

DeduplicateConfigs removes configs with duplicate project names, keeping only the first occurrence of each unique project name.

func LogoString added in v1.0.0

func LogoString() string

LogoString returns the dcstop logo as a sunset-gradient string.

func PrintLogo()

PrintLogo prints the dcstop logo with a sunset gradient.

func RunWithSpinner added in v1.0.0

func RunWithSpinner(label string, fn func() error) error

RunWithSpinner runs fn while displaying a spinner labeled with label. The spinner is replaced by ✓ on success or ✗ on failure.

func SelectProject added in v1.0.0

func SelectProject(label string, projects []ProjectItem) (int, error)

SelectProject shows an interactive filterable list of projects and returns the index of the selected item.

Types

type ProjectItem added in v1.0.0

type ProjectItem struct {
	Name        string
	ConfigType  string // "image" or "compose"
	Running     int
	Total       int
	LocalFolder string // workspace path (optional)
}

ProjectItem holds display data for a project selector entry.

Jump to

Keyboard shortcuts

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