ui

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BaseStyle   = lipgloss.NewStyle()
	SubtleStyle = lipgloss.AdaptiveColor{Light: "#D9DCCF", Dark: "#383838"}

	SelecRow = func() lipgloss.Style {
		b := view.Background(lipgloss.Color("#888B7E"))
		return b
	}()

	HelperStyle = func() lipgloss.Style {
		b := view.PaddingTop(1)
		return b
	}()

	DialogBoxStyle = lipgloss.NewStyle().
					Border(lipgloss.RoundedBorder()).
					BorderForeground(lipgloss.Color("#b7cbbf")).
					Padding(1, 2).
					BorderTop(true).
					BorderLeft(true).
					BorderRight(true).
					BorderBottom(true)

	ButtonStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("#FFFFFF")).
				Background(lipgloss.Color("#888B7E")).
				Padding(0, 3).
				MarginTop(1).
				MarginRight(2)

	ButtonDisableStyle = lipgloss.NewStyle().
						Foreground(lipgloss.Color("#FFFFFF")).
						Background(lipgloss.Color("#7a0609")).
						Padding(0, 3).
						MarginTop(1).
						MarginRight(2)

	ActiveButtonStyle = ButtonStyle.Copy().
						Foreground(lipgloss.Color("#FFFFFF")).
						Background(lipgloss.AdaptiveColor{Light: "#b7cbbf", Dark: "#b7cbbf"}).
						MarginRight(2).
						Underline(true)
)

Functions

func Max

func Max(a, b int) int

func ShrinkWordMiddle

func ShrinkWordMiddle(text string, maxLen int) string

Types

type ModelHome

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

func NewHome

func NewHome(m *entity.CmdModel) *ModelHome

func (ModelHome) FooterView

func (m ModelHome) FooterView() string

func (*ModelHome) GetDataView

func (m *ModelHome) GetDataView() string

func (*ModelHome) GetSelected

func (m *ModelHome) GetSelected() string

func (ModelHome) HeaderView

func (m ModelHome) HeaderView() string

func (ModelHome) SyncKeysView

func (m ModelHome) SyncKeysView() string

func (ModelHome) Update

func (m ModelHome) Update(msg tea.Msg) (*ModelHome, tea.Cmd)

func (ModelHome) View

func (m ModelHome) View() string

Jump to

Keyboard shortcuts

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