Help us shape the future of Go! Take the 2026 Go Developer Survey

screens

package
v0.0.0-...-424b5b7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package screens provides the UI screens for the bootstrap-cli TUI

Adapted from tools.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseScreen

type BaseScreen interface {
	tea.Model
	Done() bool
}

BaseScreen defines the interface that all screens must implement

type BaseScreenModel

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

BaseScreenModel provides common functionality for all screens

func (*BaseScreenModel) Done

func (b *BaseScreenModel) Done() bool

Done returns whether the screen is finished and ready to move to the next screen

func (*BaseScreenModel) SetDone

func (b *BaseScreenModel) SetDone(done bool)

SetDone marks the screen as done

type DotfilesScreen

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

DotfilesScreen prompts the user for dotfiles configuration.

func NewDotfilesScreen

func NewDotfilesScreen() *DotfilesScreen

func (*DotfilesScreen) Finished

func (s *DotfilesScreen) Finished() bool

func (*DotfilesScreen) GetSelection

func (s *DotfilesScreen) GetSelection() (manage bool, repoURL string)

GetSelection returns the user's choice regarding dotfiles.

func (*DotfilesScreen) Init

func (s *DotfilesScreen) Init() tea.Cmd

func (*DotfilesScreen) Update

func (s *DotfilesScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*DotfilesScreen) View

func (s *DotfilesScreen) View() string

type EssentialToolScreen

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

EssentialToolScreen uses the BaseSelector component for essential tool selection.

func NewEssentialToolScreen

func NewEssentialToolScreen(title string, tools []*pipeline.Tool, preselected []*pipeline.Tool) *EssentialToolScreen

NewEssentialToolScreen creates a new EssentialToolScreen.

func (*EssentialToolScreen) Finished

func (s *EssentialToolScreen) Finished() bool

func (*EssentialToolScreen) GetSelected

func (s *EssentialToolScreen) GetSelected() []*pipeline.Tool

func (*EssentialToolScreen) Init

func (s *EssentialToolScreen) Init() tea.Cmd

func (*EssentialToolScreen) Update

func (s *EssentialToolScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*EssentialToolScreen) View

func (s *EssentialToolScreen) View() string

type FinishScreen

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

FinishScreen is a placeholder screen.

func NewFinishScreen

func NewFinishScreen() *FinishScreen

func (*FinishScreen) Finished

func (s *FinishScreen) Finished() bool

func (*FinishScreen) Init

func (s *FinishScreen) Init() tea.Cmd

func (*FinishScreen) Update

func (s *FinishScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*FinishScreen) View

func (s *FinishScreen) View() string

type FontScreen

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

FontScreen uses the BaseSelector component for font selection.

func NewFontScreen

func NewFontScreen(title string, fonts []*interfaces.Font, preselected []*interfaces.Font) *FontScreen

NewFontScreen creates a new FontScreen.

func (*FontScreen) Finished

func (s *FontScreen) Finished() bool

func (*FontScreen) GetSelected

func (s *FontScreen) GetSelected() []*interfaces.Font

func (*FontScreen) Init

func (s *FontScreen) Init() tea.Cmd

func (*FontScreen) Update

func (s *FontScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*FontScreen) View

func (s *FontScreen) View() string

type InstallationScreen

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

func NewInstallationScreen

func NewInstallationScreen(progChan <-chan pipeline.ProgressEvent) *InstallationScreen

func (*InstallationScreen) Init

func (s *InstallationScreen) Init() tea.Cmd

func (*InstallationScreen) Update

func (s *InstallationScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*InstallationScreen) View

func (s *InstallationScreen) View() string

type LanguageScreen

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

LanguageScreen uses the BaseSelector component for language selection.

func NewLanguageScreen

func NewLanguageScreen(title string, languages []*interfaces.Language, preselected []*interfaces.Language) *LanguageScreen

NewLanguageScreen creates a new LanguageScreen.

func (*LanguageScreen) Finished

func (s *LanguageScreen) Finished() bool

func (*LanguageScreen) GetSelected

func (s *LanguageScreen) GetSelected() []*interfaces.Language

GetSelected specifically returns selected languages.

func (*LanguageScreen) Init

func (s *LanguageScreen) Init() tea.Cmd

func (*LanguageScreen) Update

func (s *LanguageScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*LanguageScreen) View

func (s *LanguageScreen) View() string

type ModernToolScreen

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

ModernToolScreen uses the BaseSelector component for modern tool selection.

func NewModernToolScreen

func NewModernToolScreen(title string, tools []*pipeline.Tool, preselected []*pipeline.Tool) *ModernToolScreen

NewModernToolScreen creates a new ModernToolScreen.

func (*ModernToolScreen) Finished

func (s *ModernToolScreen) Finished() bool

func (*ModernToolScreen) GetSelected

func (s *ModernToolScreen) GetSelected() []*pipeline.Tool

func (*ModernToolScreen) Init

func (s *ModernToolScreen) Init() tea.Cmd

func (*ModernToolScreen) Update

func (s *ModernToolScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ModernToolScreen) View

func (s *ModernToolScreen) View() string

type ShellSelectionScreen

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

ShellSelectionScreen uses the BaseSelector component for shell selection.

func NewShellSelectionScreen

func NewShellSelectionScreen(title string, availableShells []*interfaces.Shell, currentSystemShell string, preselectedShellName string) *ShellSelectionScreen

NewShellSelectionScreen creates a new ShellSelectionScreen.

func (*ShellSelectionScreen) Finished

func (s *ShellSelectionScreen) Finished() bool

func (*ShellSelectionScreen) GetSelected

func (s *ShellSelectionScreen) GetSelected() *interfaces.Shell

GetSelected returns the selected *interfaces.Shell object (first selected item).

func (*ShellSelectionScreen) Init

func (s *ShellSelectionScreen) Init() tea.Cmd

func (*ShellSelectionScreen) Update

func (s *ShellSelectionScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ShellSelectionScreen) View

func (s *ShellSelectionScreen) View() string

type TaskState

type TaskState struct {
	ID          string
	Description string
	Status      TaskStatus
	Progress    float64 // 0.0 to 1.0 for progress bar
	Error       error
	StartTime   time.Time
	EndTime     time.Time
}

type TaskStatus

type TaskStatus int
const (
	StatusPending TaskStatus = iota
	StatusRunning
	StatusRetrying
	StatusRollingBack
	StatusDone
	StatusFailed
	StatusRollbackFailed
)

type WelcomeScreen

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

WelcomeScreen handles the welcome screen display & system info

func NewWelcomeScreen

func NewWelcomeScreen() *WelcomeScreen

NewWelcomeScreen creates a new welcome screen

func (*WelcomeScreen) Finished

func (w *WelcomeScreen) Finished() bool

Finished returns true if the screen exited normally (not by quitting)

func (*WelcomeScreen) Init

func (w *WelcomeScreen) Init() tea.Cmd

Init implements tea.Model

func (*WelcomeScreen) SetInfo

func (w *WelcomeScreen) SetInfo(info *system.Info)

SetInfo allows the parent model to inject system info when ready

func (*WelcomeScreen) Update

func (w *WelcomeScreen) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model

func (*WelcomeScreen) View

func (w *WelcomeScreen) View() string

View implements tea.Model

Jump to

Keyboard shortcuts

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