ui

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorGreen       = Color("#73F59F")
	ColorRed         = Color("#F25D94")
	ColorPurple      = Color("#874BFD")
	ColorYellow      = Color("#FDE68A")
	ColorGray50      = Color("#FFF7DB")
	ColorSubtleLight = Color("#D9DCCF")
	ColorSubtleDark  = Color("#383838")
)
View Source
const NumSections = 4
View Source
const ResetCommandDuration = time.Second * 3

Variables

This section is empty.

Functions

func InitScreen

func InitScreen() error

Types

type Color

type Color = string

colors

type CommandMode

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

CommandMode stores the state for selected command mode

type CopyCommandMsg

type CopyCommandMsg struct{}

type KeyMap

type KeyMap struct {
	Up      key.Binding
	Down    key.Binding
	Left    key.Binding
	Right   key.Binding
	TabUp   key.Binding
	TabDown key.Binding
	Select  key.Binding
	Copy    key.Binding
	Quit    key.Binding
	Help    key.Binding
}

func NewKeyMap

func NewKeyMap() *KeyMap

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

type Model

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

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Options

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

Options store the state for selected options

type PWDPermissionMsg

type PWDPermissionMsg string

type PathType

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

PathType stores the state for selected path type

type Permissions

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

Permissions store the state for selected permissions

type PermissionsBlock

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

PermissionsBlock store the state for each permissions block

type ResetCommandMsg

type ResetCommandMsg string

type Section

type Section int
const (
	OptionsSection Section = iota
	CommandModeSection
	PathTypeSection
	PermissionsSection
)

func (Section) String

func (s Section) String() string

type Styles

type Styles struct {
	Banner        string
	BannerContent lipgloss.Style
	BannerText    lipgloss.Style

	Footer        lipgloss.Style
	FooterContent lipgloss.Style

	OptionsContainer  func(opts strings.Builder) string
	OptionsHeader     lipgloss.Style
	OptionsItem       lipgloss.Style
	OptionsActiveItem lipgloss.Style

	CommandModeContainer  func(modes ...string) string
	CommandModeHeader     lipgloss.Style
	CommandModeItem       lipgloss.Style
	CommandModeActiveItem lipgloss.Style

	PathTypeContainer  func(paths ...string) string
	PathTypeHeader     lipgloss.Style
	PathTypeItem       lipgloss.Style
	PathTypeActiveItem lipgloss.Style

	PermissionsHeader          lipgloss.Style
	PermissionsBlock           lipgloss.Style
	PermissionsActiveBlock     lipgloss.Style
	PermissionsBlockItem       lipgloss.Style
	PermissionsActiveBlockItem lipgloss.Style
}

func GetStyles

func GetStyles() *Styles

type UpdateCommandMsg

type UpdateCommandMsg struct {
	User   generate.User
	Access generate.Access
	Active bool
}

Jump to

Keyboard shortcuts

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