tui

package
v0.0.0-...-f1b31af Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Color   = lipgloss.AdaptiveColor{Light: "#111222", Dark: "#FAFAFA"}
	Primary = lipgloss.Color("##1976D2")
	Green   = lipgloss.Color("#1EB980")
	Teal    = lipgloss.Color("#00796B")
	Red     = lipgloss.Color("#D32F2F")
	White   = lipgloss.Color("#ffffff")
	Black   = lipgloss.Color("#000000")
	Orange  = lipgloss.Color("#FF6859")
	Feint   = lipgloss.AdaptiveColor{Light: "#333333", Dark: "#888888"}

	TextStyle  = lipgloss.NewStyle().Foreground(Color)
	FeintStyle = TextStyle.Copy().Foreground(Feint)
	BoldStyle  = TextStyle.Copy().Bold(true)
)

Functions

func NewCreateModel

func NewCreateModel() (*createModel, error)

NewCreateModel renders the UI for creating a new job

func RenderError

func RenderError(msg string) string

RenderError returns a formatted error string.

func RenderWarning

func RenderWarning(msg string) string

RenderWarning returns a formatted warning string.

Types

type DataWindow

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

func NewDataWindow

func NewDataWindow(width, height int, ref time.Time) (*DataWindow, error)

func NewWindow

func NewWindow() (*DataWindow, error)

func (*DataWindow) Init

func (e *DataWindow) Init() tea.Cmd

func (DataWindow) Selected

func (e DataWindow) Selected() *job.DataWindow

func (*DataWindow) Update

func (e *DataWindow) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles incoming keypresses, mouse moves, resize events etc.

func (*DataWindow) UpdateSize

func (e *DataWindow) UpdateSize(width, height int)

UpdateSize updates the size of the event browser's rendering area.

func (*DataWindow) View

func (e *DataWindow) View() string

View renders the list.

Jump to

Keyboard shortcuts

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