statusbar

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Keys = KeyMap{
	UserListView: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "user list"),
	),
	UserDetailsView: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "user details"),
	),
	RoleListView: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "role list"),
	),
	RoleDetailsView: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "role details"),
	),
	Help: key.NewBinding(
		key.WithKeys("?"),
		key.WithHelp("?", "toggle help"),
	),
	Quit: key.NewBinding(
		key.WithKeys("ctrl+c"),
		key.WithHelp("ctrl+c", "quit"),
	),
	Roles: key.NewBinding(
		key.WithKeys("r"),
		key.WithHelp("r", "roles")),
	Users: key.NewBinding(
		key.WithKeys("u"),
		key.WithHelp("u", "users"),
	),
}

Functions

This section is empty.

Types

type Bubble

type Bubble struct {
	Styles Styles

	StatusMessageLifetime time.Duration
	// contains filtered or unexported fields
}

func New

func New(stardogClient stardog.Client) Bubble

func (Bubble) Init

func (b Bubble) Init() tea.Cmd

func (*Bubble) NewStatusMessage

func (b *Bubble) NewStatusMessage(s string, success bool) tea.Cmd

func (*Bubble) SetWidth

func (b *Bubble) SetWidth(width int)

func (Bubble) Update

func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd)

func (*Bubble) UpdateMode

func (b *Bubble) UpdateMode(mode mode.ActiveMode)

func (Bubble) View

func (b Bubble) View() string

type KeyMap

type KeyMap struct {
	UserListView    key.Binding
	UserDetailsView key.Binding
	RoleListView    key.Binding
	RoleDetailsView key.Binding

	Help  key.Binding
	Quit  key.Binding
	Roles key.Binding
	Users key.Binding
}

type Styles

type Styles struct {
	StatusBarStyle      lipgloss.Style
	EndpointStyle       lipgloss.Style
	HelpKeyStyle        lipgloss.Style
	HelpTextStyle       lipgloss.Style
	ErrorMessageStyle   lipgloss.Style
	SuccessMessageStyle lipgloss.Style
}

func DefaultStyles

func DefaultStyles() (s Styles)

Jump to

Keyboard shortcuts

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