ui

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SuccessStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("42"))
	ErrorStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color("196"))
	MutedStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color("245"))
	BoldStyle    = lipgloss.NewStyle().Bold(true)

	HeaderStyle = lipgloss.NewStyle().
				Foreground(lipgloss.AdaptiveColor{Light: "#2563EB", Dark: "#60A5FA"}).
				Bold(true)
	HeaderDividerStyle = lipgloss.NewStyle().
						Foreground(lipgloss.AdaptiveColor{Light: "238", Dark: "238"})
)

Functions

func BrandHeader

func BrandHeader() string

func BuildStartTimeOptions

func BuildStartTimeOptions() []huh.Option[string]

func BuildTimezoneOptions

func BuildTimezoneOptions(detected string) []huh.Option[string]

func ClearAndBrand

func ClearAndBrand()

func ClearScreen

func ClearScreen()

func EnterAltScreen

func EnterAltScreen()

func ExitAltScreen

func ExitAltScreen()

func RenderStatusTable

func RenderStatusTable(instances []config.Instance) string

func RunWithSpinner

func RunWithSpinner(title string, action func() error) error

func RunWithSpinnerFullscreen

func RunWithSpinnerFullscreen(title string, action func() error) error

func TokFreshTheme

func TokFreshTheme() *huh.Theme

Types

type WizardResult

type WizardResult struct {
	WorkerName          string
	AuthCode            string
	StartTime           string
	Timezone            string
	NotificationType    string
	NotificationWebhook string
	NotifyOnFailureOnly bool
	CloudflareAuthMode  string
	CloudflareAPIToken  string
}

func RunSetupWizard

func RunSetupWizard(detectedTimezone, authURL string) (*WizardResult, error)

func (*WizardResult) BuildNotificationConfig

func (r *WizardResult) BuildNotificationConfig() string

Jump to

Keyboard shortcuts

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