ui

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const KEY_COLUMNS = 10

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, filter string) (*taro.Program, error)

func NewBrowser

func NewBrowser(
	ctx context.Context,
	stories []S.Story,
) *taro.Program

func NewKeys

func NewKeys(
	ctx context.Context,
) *taro.Program

func NewViewer

func NewViewer(
	ctx context.Context,
	story stories.Story,
	shouldLoop bool,
) *taro.Program

Types

type Browser

type Browser struct {
	util.Lifetime
	// contains filtered or unexported fields
}

A Browser lets the user switch between different stories.

func (*Browser) Init

func (s *Browser) Init() tea.Cmd

func (*Browser) Update

func (s *Browser) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Browser) View

func (s *Browser) View(state *tty.State)

type Keys

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

func (*Keys) Init

func (k *Keys) Init() tea.Cmd

func (*Keys) Update

func (k *Keys) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Keys) View

func (k *Keys) View(state *tty.State)

type Viewer

type Viewer struct {
	util.Lifetime
	// contains filtered or unexported fields
}

A Viewer shows a single story.

func (*Viewer) Init

func (v *Viewer) Init() tea.Cmd

func (*Viewer) Update

func (v *Viewer) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Viewer) View

func (v *Viewer) View(state *tty.State)

Jump to

Keyboard shortcuts

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