login

package
v0.0.0-...-bfe490c Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const WelcomeMsg = `` /* 452-byte string literal not displayed */

Variables

View Source
var (
	BlurredDisabledButton = lipgloss.NewStyle().
							Border(lipgloss.NormalBorder()).
							BorderForeground(ui.DisabledColor).
							Foreground(ui.DisabledColor).
							MarginTop(1).
							Padding(0, 2).
							Align(lipgloss.Center).
							Render("Connect")
	FocusedDisabledButton = lipgloss.NewStyle().
							Border(lipgloss.NormalBorder()).
							BorderForeground(ui.DisabledColorFocus).
							Foreground(ui.DisabledColorFocus).
							MarginTop(1).
							Padding(0, 2).
							Align(lipgloss.Center).
							Render("Connect")
	FocusedButton = lipgloss.NewStyle().
					Border(lipgloss.NormalBorder()).
					BorderForeground(ui.AccentColor).
					Foreground(ui.AccentColor).
					MarginTop(1).
					Padding(0, 2).
					Align(lipgloss.Center).
					Bold(true).
					Render("Connect")
	BlurredButton = lipgloss.NewStyle().
					Border(lipgloss.NormalBorder()).
					BorderForeground(ui.PrimaryColor).
					Foreground(ui.PrimaryColor).
					MarginTop(1).
					Padding(0, 2).
					Align(lipgloss.Center).
					Render("Connect")
	FocusedCheckbox = lipgloss.NewStyle().
					Foreground(ui.AccentColor).
					MarginTop(1).
					Render("TLS Enabled [✕]")

	BlurredCheckbox = lipgloss.NewStyle().
					Foreground(ui.PrimaryColor).
					MarginTop(1).
					Render("TLS Enabled [✕]")

	FocusedCheckboxChecked = lipgloss.NewStyle().
							Foreground(ui.AccentColor).
							MarginTop(1).
							Render("TLS Enabled [🗸]")

	BlurredCheckboxChecked = lipgloss.NewStyle().
							Foreground(ui.PrimaryColor).
							MarginTop(1).
							Render("TLS Enabled [🗸]")

	DialogStyle = lipgloss.NewStyle().
				Align(lipgloss.Center)

	WelcomeMsgStyle = lipgloss.NewStyle().
					Align(lipgloss.Center).
					Foreground(ui.PrimaryColor)

	CursorStyle = lipgloss.NewStyle().
				Foreground(ui.AccentColor)
	FocusedStyle = lipgloss.NewStyle().
					Foreground(ui.AccentColor)
)

Functions

func NoSpacesValidation

func NoSpacesValidation(input string) error

func ValidatePort

func ValidatePort(input string) error

Types

type State

type State struct {
	FocusIndex                int
	Inputs                    []textinput.Model
	TLS                       bool
	CanConnect                bool
	ConnectButtonBlurredStyle string
	ConnectButtonFocusedStyle string
	DialogStyle               lipgloss.Style
	WelcomeMsgStyle           lipgloss.Style
	Style                     lipgloss.Style
}

func NewLogin

func NewLogin() State

func (*State) SetSize

func (s *State) SetSize(width, height int)

func (State) Update

func (s State) Update(msg tea.Msg) (State, tea.Cmd)

func (State) View

func (s State) View() string

Jump to

Keyboard shortcuts

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