ui

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const ListHeight = 14

Variables

View Source
var (
	ChatUserNameStyle = lipgloss.NewStyle().Bold(true)
)
View Source
var CloseChatConn bool = false

Functions

func CheckToken

func CheckToken() error

func ConnectToChannel

func ConnectToChannel(channelName string, sub chan chatMessage) tea.Cmd

func GetChannels

func GetChannels() ([]list.Item, error)

func ReadMessages

func ReadMessages(channelName string, sub chan chatMessage) error

Types

type Model

type Model struct {
	Spinner         spinner.Model
	Viewport        viewport.Model
	Textarea        textarea.Model
	SenderStyle     lipgloss.Style
	Quitting        bool
	CurrentChannel  string
	Messages        []string
	State           ModelState
	List            list.Model
	SelectedChannel string
	TextInput       textinput.Model
	Err             error
	LoadingString   string

	ChatMessage string
	// contains filtered or unexported fields
}

func InitialModel

func InitialModel() Model

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 ModelState

type ModelState int
const (
	ModelStateMain ModelState = iota
	ModelStatePlaying
	ModelStateLoading
	ModelStateError
	ModelStatePlayNoneFollowed
)

type TokenPass

type TokenPass bool

Jump to

Keyboard shortcuts

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