ui

package
v0.0.0-...-c9d98e2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateList

func CreateList(mtv *MessagesTextView) *tview.List

func HandleCommand

func HandleCommand(mi *MessageInputField, t string, m *astatine.Message) bool

func InitCommands

func InitCommands()

Types

type App

type App struct {
	*tview.Application
	MainFlex          *tview.Flex
	GuildsList        *GuildsList
	ChannelsTreeView  *ChannelsTreeView
	MessagesTextView  *MessagesTextView
	MessageInputField *MessageInputField
	Session           *astatine.Session
	SelectedChannel   *astatine.Channel
	Config            *config.Config
	SelectedMessage   int
}

func NewApp

func NewApp(token string, c *config.Config) *App

func (*App) Connect

func (app *App) Connect() error

func (*App) DrawMainFlex

func (app *App) DrawMainFlex()

type ChannelsTreeView

type ChannelsTreeView struct {
	*tview.TreeView
	// contains filtered or unexported fields
}

func NewChannelsTreeView

func NewChannelsTreeView(app *App) *ChannelsTreeView

type Command

type Command struct {
	Names       []string
	Description string
	Usage       string
	Execute     func(mi *MessageInputField, argv []string, argc int, m *astatine.Message)
	Terminating bool // If true the command will stop message sending, if false, it will send a message when done.
}

type GuildsList

type GuildsList struct {
	*tview.List
	// contains filtered or unexported fields
}

func NewGuildsList

func NewGuildsList(app *App) *GuildsList

type LoginForm

type LoginForm struct {
	*tview.Form
}

func NewLoginForm

func NewLoginForm(mfa bool) *LoginForm

type MessageInputField

type MessageInputField struct {
	*tview.InputField
	// contains filtered or unexported fields
}

func NewMessageInputField

func NewMessageInputField(app *App) *MessageInputField

type MessagesTextView

type MessagesTextView struct {
	*tview.TextView
	// contains filtered or unexported fields
}

func NewMessagesTextView

func NewMessagesTextView(app *App) *MessagesTextView

Jump to

Keyboard shortcuts

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