tui2

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const FARCASTER_EPOCH int64 = 1609459200

Variables

This section is empty.

Functions

This section is empty.

Types

type CastsModel

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

func NewCastsModel

func NewCastsModel() *CastsModel

func (*CastsModel) GetCast

func (m *CastsModel) GetCast(cursor int) *fctools.Cast

func (*CastsModel) GetItemInFocus

func (m *CastsModel) GetItemInFocus() string

func (*CastsModel) GetStatus

func (m *CastsModel) GetStatus() CastsStatus

func (*CastsModel) Init

func (m *CastsModel) Init() tea.Cmd

func (*CastsModel) IsFocus

func (m *CastsModel) IsFocus() bool

func (*CastsModel) LoadCasts

func (m *CastsModel) LoadCasts(fid uint64, hash []byte) *CastsModel

func (*CastsModel) LoadFid

func (m *CastsModel) LoadFid(fid uint64) *CastsModel

func (*CastsModel) Quit

func (m *CastsModel) Quit() (tea.Model, tea.Cmd)

func (*CastsModel) SetFocus

func (m *CastsModel) SetFocus(onoff bool, idx int)

func (*CastsModel) SetResultsCount

func (m *CastsModel) SetResultsCount(count uint32)

func (*CastsModel) SetView

func (m *CastsModel) SetView(v View)

func (*CastsModel) Status

func (m *CastsModel) Status() (uint64, []byte, View)

func (*CastsModel) Update

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

func (*CastsModel) View

func (m *CastsModel) View() string

func (*CastsModel) ViewCasts

func (m *CastsModel) ViewCasts() string

func (*CastsModel) WindowHeight

func (m *CastsModel) WindowHeight() int

type CastsStatus

type CastsStatus struct {
	Fid         uint64
	Hash        []byte
	Width       int
	Height      int
	View        ViewType
	ViewStart   int
	ViewEnd     int
	Cursor      int
	Focus       bool
	ActiveField int
}

func (CastsStatus) String

func (s CastsStatus) String() string

type LoadCastId

type LoadCastId struct {
	Fid  uint64
	Hash []byte
}

type LoadFid

type LoadFid struct {
	Fid uint64
}

type MsgUpdateView

type MsgUpdateView = View

type StatusBar

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

func NewStatusBar

func NewStatusBar() *StatusBar

func (*StatusBar) GetStatus

func (s *StatusBar) GetStatus() string

func (*StatusBar) Height

func (s *StatusBar) Height() int

func (*StatusBar) Init

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

func (*StatusBar) SetHeight

func (s *StatusBar) SetHeight(h int) *StatusBar

func (*StatusBar) SetStatus

func (s *StatusBar) SetStatus(status string) *StatusBar

func (*StatusBar) SetText

func (s *StatusBar) SetText(t string) *StatusBar

func (*StatusBar) Update

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

func (*StatusBar) View

func (s *StatusBar) View() string

type UpdateStatusBar

type UpdateStatusBar struct {
	Text string
}

Message types

type View

type View struct {
	Start  int
	End    int
	Cursor int
	Height int
}

type ViewType

type ViewType int
const (
	VIEW_PROFILE ViewType = iota
	VIEW_LIST
	VIEW_THREAD
	VIEW_CAST
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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