common

package
v0.0.0-...-a09db05 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
View Source
const Splash = `` /* 728-byte string literal not displayed */

Variables

View Source
var (
	SecondaryTextStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("8"))
	BoxContainerStyle  = lipgloss.NewStyle().BorderStyle(lipgloss.NormalBorder()).
						BorderForeground(lipgloss.Color("4")).Padding(0, 1)
	LogoStyle         = lipgloss.NewStyle().Foreground(lipgloss.Color("12"))
	LogoActivityStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("4"))
	ErrorStyle        = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("197"))

	CheckMark = lipgloss.NewStyle().Foreground(lipgloss.Color("42")).SetString("✓")
)

Lipgloss styles used across the UI

View Source
var LogoSprite = []string{
	LogoStyle.Render(`     ┏━══════━┓     
┏━━━━┻━━━━━━━━┻━━━━┓
┠──────▀▀▀▀▀▀──────┨
┃ ▟██▙ ▕▚▞▚▞▏ ▟██▙ ┃
┃ ▜██▛  ○○○○  ▜██▛ ┃
┗━━━━━━━━━━━━━━━━━━┛`),
	LogoActivityStyle.Render(`     ┏━══════━┓     
┏━━━━┻━━━━━━━━┻━━━━┓
┠──────▀▀▀▀▀▀──────┨
┃ ▟██▙ ▕▞▚▞▚▏ ▟██▙ ┃
┃ ▜██▛  ○○○○  ▜██▛ ┃
┗━━━━━━━━━━━━━━━━━━┛`),
	LogoStyle.Render(`     ┏━══════━┓     
┏━━━━┻━━━━━━━━┻━━━━┓
┠──────▀▀▀▀▀▀──────┨
┃ ▟██▙ ▕▚▞▚▞▏ ▟██▙ ┃
┃ ▜██▛  ◙○○○  ▜██▛ ┃
┗━━━━━━━━━━━━━━━━━━┛`),
	LogoActivityStyle.Render(`     ┏━══════━┓     
┏━━━━┻━━━━━━━━┻━━━━┓
┠──────▀▀▀▀▀▀──────┨
┃ ▟██▙ ▕▞▚▞▚▏ ▟██▙ ┃
┃ ▜██▛  ○◙○○  ▜██▛ ┃
┗━━━━━━━━━━━━━━━━━━┛`),
	LogoStyle.Render(`     ┏━══════━┓     
┏━━━━┻━━━━━━━━┻━━━━┓
┠──────▀▀▀▀▀▀──────┨
┃ ▟██▙ ▕▚▞▚▞▏ ▟██▙ ┃
┃ ▜██▛  ○○◙○  ▜██▛ ┃
┗━━━━━━━━━━━━━━━━━━┛`),
	LogoActivityStyle.Render(`     ┏━══════━┓     
┏━━━━┻━━━━━━━━┻━━━━┓
┠──────▀▀▀▀▀▀──────┨
┃ ▟██▙ ▕▞▚▞▚▏ ▟██▙ ┃
┃ ▜██▛  ○○○◙  ▜██▛ ┃
┗━━━━━━━━━━━━━━━━━━┛`),
}
View Source
┏━━━┻━━┻━━━┓
┃▐█▌ ○○ ▐█▌┃
┗━━━━━━━━━━┛`)

Functions

This section is empty.

Types

type Common

type Common struct {
	Session ssh.Session
	User    string

	Width  int
	Height int

	Client  *k8s.Client
	Config  *config.Config
	Actions *actions.Actions
	State   state.State
}

Common holds elements used by all the UI components and views.

func (*Common) RenderCentered

func (c *Common) RenderCentered(text string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳