ui

package
v0.0.0-...-33d7cd8 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InputUserNormal = iota
	InputUserFollowRequest
	InputUserListAdd
	InputUserListDelete
)

Variables

View Source
var Accounts *auth.AccountData
View Source
var Config *config.Config

Functions

func CliView

func CliView(version string) (newUser bool, selectedUser string, confPath string, confDir string)

func DoneAdding

func DoneAdding()

func DrawItem

func DrawItem(tv *TutView, item api.Item, main *tview.TextView, controls *tview.Flex, ft config.FeedType)

func DrawItemControls

func DrawItemControls(tv *TutView, item api.Item, controls *tview.Flex, ft config.FeedType)

func DrawListItem

func DrawListItem(cfg *config.Config, item api.Item) (string, string)

func FloorDate

func FloorDate(t time.Time) time.Time

func GetCurrentID

func GetCurrentID(l *tview.List) uint

func NewAccButton

func NewAccButton(tv *TutView, cnf *config.Config, name string, index int, isActive bool) *tview.Button

func NewControlButton

func NewControlButton(tv *TutView, control Control) *tview.Button

func NewControlView

func NewControlView(cnf *config.Config) *tview.Flex

func NewDropDown

func NewDropDown(cnf *config.Config) *tview.DropDown

func NewHorizontalLine

func NewHorizontalLine(cnf *config.Config) *tview.Box

func NewInputField

func NewInputField(cnf *config.Config) *tview.InputField

func NewList

func NewList(cnf *config.Config) *tview.List

func NewModal

func NewModal(cnf *config.Config) *tview.Modal

func NewScrollSleep

func NewScrollSleep(next func(), prev func()) *scrollSleep

func NewTextArea

func NewTextArea(cnf *config.Config) *tview.TextArea

func NewTextView

func NewTextView(cnf *config.Config) *tview.TextView

func NewTutView

func NewTutView(selectedUser string)

func NewVerticalLine

func NewVerticalLine(cnf *config.Config) *tview.Box

func OpenEditor

func OpenEditor(tv *TutView, content string) (string, error)

func OpenEditorLengthLimit

func OpenEditorLengthLimit(tv *TutView, s string, limit int) (string, error)

func OutputDate

func OutputDate(cfg *config.Config, status time.Time) string

func SetByID

func SetByID(id uint, l *tview.List)

func SetVars

func SetVars(config *config.Config, app *tview.Application, accounts *auth.AccountData)

Types

type Bottom

type Bottom struct {
	View      tview.Primitive
	StatusBar *StatusBar
	Cmd       *CmdBar
}

func NewBottom

func NewBottom(tv *TutView) *Bottom

type Card

type Card struct {
	Type        string
	Title       string
	Description string
	URL         string
}

type CmdBar

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

func NewCmdBar

func NewCmdBar(tv *TutView) *CmdBar

func (*CmdBar) Autocomplete

func (c *CmdBar) Autocomplete(curr string) []string

func (*CmdBar) Autocompleted

func (c *CmdBar) Autocompleted(text string, index, source int) bool

func (*CmdBar) Back

func (c *CmdBar) Back()

func (*CmdBar) ClearInput

func (c *CmdBar) ClearInput()

func (*CmdBar) DoneFunc

func (c *CmdBar) DoneFunc(key tcell.Key)

func (*CmdBar) GetInput

func (c *CmdBar) GetInput() string

func (*CmdBar) ShowError

func (c *CmdBar) ShowError(s string)

func (*CmdBar) ShowMsg

func (c *CmdBar) ShowMsg(s string)

type ComposeControls

type ComposeControls uint
const (
	ComposeNormal ComposeControls = iota
	ComposeMedia
)

type ComposeView

type ComposeView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewComposeView

func NewComposeView(tv *TutView) *ComposeView

func (*ComposeView) EditSpoiler

func (cv *ComposeView) EditSpoiler()

func (*ComposeView) EditText

func (cv *ComposeView) EditText()

func (*ComposeView) FocusLang

func (cv *ComposeView) FocusLang()

func (*ComposeView) FocusVisibility

func (cv *ComposeView) FocusVisibility()

func (*ComposeView) HasMedia

func (cv *ComposeView) HasMedia() bool

func (*ComposeView) IncludeQuote

func (cv *ComposeView) IncludeQuote()

func (*ComposeView) Post

func (cv *ComposeView) Post()

func (*ComposeView) SetControls

func (cv *ComposeView) SetControls(ctrl ComposeControls)

func (*ComposeView) SetStatus

func (cv *ComposeView) SetStatus(reply *mastodon.Status, edit *mastodon.Status) error

func (*ComposeView) ToggleCW

func (cv *ComposeView) ToggleCW()

func (*ComposeView) UpdateContent

func (cv *ComposeView) UpdateContent()

type Control

type Control struct {
	Label string
	Len   int
	// contains filtered or unexported fields
}

func NewControl

func NewControl(c *config.Config, k config.Key, first bool) Control

func (Control) Click

func (c Control) Click() *tcell.EventKey

type DisplayTootData

type DisplayTootData struct {
	Toot  Toot
	Style config.Style
}

type DisplayUserData

type DisplayUserData struct {
	User  User
	Style config.Style
}

type EditorView

type EditorView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewEditorView

func NewEditorView(tv *TutView) *EditorView

func (*EditorView) ExitTextAreaInput

func (e *EditorView) ExitTextAreaInput()

func (*EditorView) Init

func (e *EditorView) Init(text string, textLimit int, setReturn bool, exit func(string))

type Feed

type Feed struct {
	Data     *feed.Feed
	List     *FeedList
	Content  *FeedContent
	Timeline *config.Timeline
	// contains filtered or unexported fields
}

func CreateFeed

func CreateFeed(tv *TutView, f *config.Timeline) *Feed

func NewBlocking

func NewBlocking(tv *TutView, tl *config.Timeline) *Feed

func NewBookmarksFeed

func NewBookmarksFeed(tv *TutView, tl *config.Timeline) *Feed

func NewBoosts

func NewBoosts(tv *TutView, id mastodon.ID, tl *config.Timeline) *Feed

func NewConversationsFeed

func NewConversationsFeed(tv *TutView, tl *config.Timeline) *Feed

func NewFavoritedFeed

func NewFavoritedFeed(tv *TutView, tl *config.Timeline) *Feed

func NewFavoritesStatus

func NewFavoritesStatus(tv *TutView, id mastodon.ID, tl *config.Timeline) *Feed

func NewFederatedFeed

func NewFederatedFeed(tv *TutView, tl *config.Timeline) *Feed

func NewFollowRequests

func NewFollowRequests(tv *TutView, tl *config.Timeline) *Feed

func NewFollowers

func NewFollowers(tv *TutView, id mastodon.ID, tl *config.Timeline) *Feed

func NewFollowing

func NewFollowing(tv *TutView, id mastodon.ID, tl *config.Timeline) *Feed

func NewHistoryFeed

func NewHistoryFeed(tv *TutView, item api.Item, tl *config.Timeline) *Feed

func NewHomeFeed

func NewHomeFeed(tv *TutView, tl *config.Timeline) *Feed

func NewHomeSpecialFeed

func NewHomeSpecialFeed(tv *TutView, tl *config.Timeline) *Feed

func NewListFeed

func NewListFeed(tv *TutView, l *mastodon.List, tl *config.Timeline) *Feed

func NewListsFeed

func NewListsFeed(tv *TutView, tl *config.Timeline) *Feed

func NewLocalFeed

func NewLocalFeed(tv *TutView, tl *config.Timeline) *Feed

func NewMuting

func NewMuting(tv *TutView, tl *config.Timeline) *Feed

func NewNotificatioMentionsFeed

func NewNotificatioMentionsFeed(tv *TutView, tl *config.Timeline) *Feed

func NewNotificationFeed

func NewNotificationFeed(tv *TutView, tl *config.Timeline) *Feed

func NewTagFeed

func NewTagFeed(tv *TutView, tl *config.Timeline) *Feed

func NewTagsFeed

func NewTagsFeed(tv *TutView, tl *config.Timeline) *Feed

func NewThreadFeed

func NewThreadFeed(tv *TutView, item api.Item, tl *config.Timeline) *Feed

func NewUserFeed

func NewUserFeed(tv *TutView, item api.Item, tl *config.Timeline) *Feed

func NewUserSearchFeed

func NewUserSearchFeed(tv *TutView, tl *config.Timeline) *Feed

func NewUsersAddListFeed

func NewUsersAddListFeed(tv *TutView, l *mastodon.List, tl *config.Timeline) *Feed

func NewUsersInListFeed

func NewUsersInListFeed(tv *TutView, l *mastodon.List, tl *config.Timeline) *Feed

func (*Feed) Delete

func (f *Feed) Delete()

func (*Feed) DrawContent

func (f *Feed) DrawContent()

func (*Feed) ListInFocus

func (f *Feed) ListInFocus()

func (*Feed) ListOutFocus

func (f *Feed) ListOutFocus()

func (*Feed) LoadNewer

func (f *Feed) LoadNewer(force bool)

func (*Feed) LoadOlder

func (f *Feed) LoadOlder()

type FeedContent

type FeedContent struct {
	Main     *tview.TextView
	Controls *tview.Flex
}

func NewFeedContent

func NewFeedContent(t *Tut) *FeedContent

type FeedHolder

type FeedHolder struct {
	Feeds     []*Feed
	FeedIndex int
}

func (*FeedHolder) GetFeedList

func (fh *FeedHolder) GetFeedList() *FeedList

func (*FeedHolder) GetTitle

func (fh *FeedHolder) GetTitle() string

type FeedList

type FeedList struct {
	Text   *tview.List
	Symbol *tview.List
	// contains filtered or unexported fields
}

func NewFeedList

func NewFeedList(t *Tut, stickyCount int) *FeedList

func (*FeedList) AddItem

func (fl *FeedList) AddItem(text string, symbols string, id uint)

func (*FeedList) Clear

func (fl *FeedList) Clear()

func (*FeedList) GetCurrentID

func (fl *FeedList) GetCurrentID() uint

func (*FeedList) GetItemCount

func (fl *FeedList) GetItemCount() int

func (*FeedList) InFocus

func (fl *FeedList) InFocus(style config.Style)

func (*FeedList) Next

func (fl *FeedList) Next() (loadOlder bool)

func (*FeedList) OutFocus

func (fl *FeedList) OutFocus(style config.Style)

func (*FeedList) Prev

func (fl *FeedList) Prev() (loadNewer bool)

func (*FeedList) Set

func (fl *FeedList) Set(index int) (loadOlder bool, loadNewer bool)

func (*FeedList) SetByID

func (fl *FeedList) SetByID(id uint)

func (*FeedList) SetCurrentItem

func (fl *FeedList) SetCurrentItem(index int)

type Field

type Field struct {
	Name       string
	Value      string
	VerifiedAt time.Time
}

type HelpData

type HelpData struct {
	Style config.Style
}

type HelpView

type HelpView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewHelpView

func NewHelpView(tv *TutView) *HelpView

type InputUserType

type InputUserType uint

type Leader

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

func NewLeader

func NewLeader(tv *TutView) *Leader

func (*Leader) AddRune

func (l *Leader) AddRune(r rune)

func (*Leader) Content

func (l *Leader) Content() string

func (*Leader) IsActive

func (l *Leader) IsActive() bool

func (*Leader) Reset

func (l *Leader) Reset()

func (*Leader) ResetInactive

func (l *Leader) ResetInactive()

type LinkView

type LinkView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewLinkView

func NewLinkView(tv *TutView) *LinkView

func (*LinkView) Next

func (lv *LinkView) Next()

func (*LinkView) Open

func (lv *LinkView) Open()

func (*LinkView) OpenCustom

func (lv *LinkView) OpenCustom(c config.Custom)

func (*LinkView) Prev

func (lv *LinkView) Prev()
func (lv *LinkView) SetLinks()

func (*LinkView) Yank

func (lv *LinkView) Yank()

type List

type List struct {
}

type LoginView

type LoginView struct {
	View tview.Primitive
	// contains filtered or unexported fields
}

func NewLoginView

func NewLoginView(tv *TutView, accs *auth.AccountData) *LoginView

func (*LoginView) Next

func (l *LoginView) Next()

func (*LoginView) Prev

func (l *LoginView) Prev()

func (*LoginView) Selected

func (l *LoginView) Selected()

type MainView

type MainView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewMainView

func NewMainView(tv *TutView, update chan bool) *MainView

func (*MainView) ForceUpdate

func (mv *MainView) ForceUpdate()

type Media

type Media struct {
	Type        string
	Description string
	URL         string
}

type MediaInput

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

func NewMediaInput

func NewMediaInput(tv *TutView) *MediaInput

func (*MediaInput) AddRune

func (m *MediaInput) AddRune(r rune)

func (*MediaInput) AutocompleteNext

func (m *MediaInput) AutocompleteNext()

func (*MediaInput) AutocompletePrev

func (m *MediaInput) AutocompletePrev()

func (*MediaInput) AutocompleteTab

func (m *MediaInput) AutocompleteTab()

func (*MediaInput) CheckDone

func (m *MediaInput) CheckDone()

func (*MediaInput) HandleChanges

func (m *MediaInput) HandleChanges(text string)

type MediaList

type MediaList struct {
	View *tview.Flex

	Files []UploadFile
	// contains filtered or unexported fields
}

func NewMediaList

func NewMediaList(tv *TutView) *MediaList

func (*MediaList) AddFile

func (m *MediaList) AddFile(f string)

func (*MediaList) AddFromEdit

func (m *MediaList) AddFromEdit(edit *mastodon.Status)

func (*MediaList) Delete

func (m *MediaList) Delete()

func (*MediaList) Draw

func (m *MediaList) Draw()

func (*MediaList) EditDesc

func (m *MediaList) EditDesc()

func (*MediaList) Next

func (m *MediaList) Next()

func (*MediaList) Prev

func (m *MediaList) Prev()

func (*MediaList) Reset

func (m *MediaList) Reset()

func (*MediaList) SetFocus

func (m *MediaList) SetFocus(reset bool)

type ModalView

type ModalView struct {
	View *tview.Modal
	// contains filtered or unexported fields
}

func NewModalView

func NewModalView(tv *TutView) *ModalView

func (*ModalView) Run

func (mv *ModalView) Run(text string, fn func())

func (*ModalView) RunDecide

func (mv *ModalView) RunDecide(text string, fnYes func(), fnNo func())

func (*ModalView) Stop

func (mv *ModalView) Stop(fn func())

type PageFocusAt

type PageFocusAt uint
const (
	LoginFocus PageFocusAt = iota
	MainFocus
	ViewFocus
	ModalFocus
	LinkFocus
	ComposeFocus
	MediaFocus
	MediaAddFocus
	CmdFocus
	VoteFocus
	HelpFocus
	EditorFocus
	PollFocus
	PreferenceFocus
)

type Poll

type Poll struct {
	ID         string
	ExpiresAt  time.Time
	Expired    bool
	Multiple   bool
	VotesCount int64
	Options    []PollOption
	Voted      bool
}

type PollOption

type PollOption struct {
	Title      string
	VotesCount int64
	Percent    string
}

type PollView

type PollView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewPollView

func NewPollView(tv *TutView) *PollView

func (*PollView) Add

func (p *PollView) Add()

func (*PollView) AddPoll

func (p *PollView) AddPoll(np *mastodon.Poll)

func (*PollView) Delete

func (p *PollView) Delete()

func (*PollView) Edit

func (p *PollView) Edit()

func (*PollView) FocusExpiration

func (p *PollView) FocusExpiration()

func (*PollView) GetPoll

func (p *PollView) GetPoll() *mastodon.TootPoll

func (*PollView) HasPoll

func (p *PollView) HasPoll() bool

func (*PollView) Next

func (p *PollView) Next()

func (*PollView) Prev

func (p *PollView) Prev()

func (*PollView) Reset

func (p *PollView) Reset()

func (*PollView) ToggleMultiple

func (p *PollView) ToggleMultiple()

type PreferenceView

type PreferenceView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewPreferenceView

func NewPreferenceView(tv *TutView) *PreferenceView

func (*PreferenceView) AddField

func (p *PreferenceView) AddField()

func (*PreferenceView) DeleteField

func (p *PreferenceView) DeleteField()

func (*PreferenceView) EditBio

func (p *PreferenceView) EditBio()

func (*PreferenceView) EditDisplayname

func (p *PreferenceView) EditDisplayname()

func (*PreferenceView) EditField

func (p *PreferenceView) EditField()

func (*PreferenceView) FieldFocus

func (p *PreferenceView) FieldFocus()

func (*PreferenceView) FocusVisibility

func (p *PreferenceView) FocusVisibility()

func (*PreferenceView) HasFieldFocus

func (p *PreferenceView) HasFieldFocus() bool

func (*PreferenceView) MainFocus

func (p *PreferenceView) MainFocus()

func (*PreferenceView) NextField

func (p *PreferenceView) NextField()

func (*PreferenceView) PrevField

func (p *PreferenceView) PrevField()

func (*PreferenceView) Save

func (p *PreferenceView) Save()

func (*PreferenceView) Update

func (p *PreferenceView) Update()

type Shared

type Shared struct {
	Top    *Top
	Bottom *Bottom
}

func NewShared

func NewShared(tv *TutView) *Shared

type StatusBar

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

func NewStatusBar

func NewStatusBar(tv *TutView) *StatusBar

func (*StatusBar) SetMode

func (sb *StatusBar) SetMode(m ViewMode)

type SubFocusAt

type SubFocusAt uint
const (
	ListFocus SubFocusAt = iota
	ContentFocus
)

type Tag

type Tag struct {
}

type Timeline

type Timeline struct {
	Feeds          []*FeedHolder
	FeedFocusIndex int
	// contains filtered or unexported fields
}

func NewTimeline

func NewTimeline(tv *TutView, update chan bool) *Timeline

func (*Timeline) AddFeed

func (tl *Timeline) AddFeed(f *Feed, newPane bool)

func (*Timeline) CloseCurrentPane

func (tl *Timeline) CloseCurrentPane()

func (*Timeline) DeleteItemFeed

func (tl *Timeline) DeleteItemFeed()

func (*Timeline) DrawContent

func (tl *Timeline) DrawContent()

func (*Timeline) EndItemFeed

func (tl *Timeline) EndItemFeed()

func (*Timeline) FindAndGoTo

func (tl *Timeline) FindAndGoTo(ft config.FeedType, data string, hideBoosts, hideReplies bool) bool

func (*Timeline) GetFeedContent

func (tl *Timeline) GetFeedContent() *FeedContent

func (*Timeline) GetTitle

func (tl *Timeline) GetTitle() string

func (*Timeline) HomeItemFeed

func (tl *Timeline) HomeItemFeed()

func (*Timeline) MoveCurrentPaneEnd

func (tl *Timeline) MoveCurrentPaneEnd()

func (*Timeline) MoveCurrentPaneHome

func (tl *Timeline) MoveCurrentPaneHome()

func (*Timeline) MoveCurrentPaneLeft

func (tl *Timeline) MoveCurrentPaneLeft()

func (*Timeline) MoveCurrentPaneRight

func (tl *Timeline) MoveCurrentPaneRight()

func (*Timeline) NextFeed

func (tl *Timeline) NextFeed()

func (*Timeline) NextItemFeed

func (tl *Timeline) NextItemFeed()

func (*Timeline) PrevFeed

func (tl *Timeline) PrevFeed()

func (*Timeline) PrevItemFeed

func (tl *Timeline) PrevItemFeed()

func (*Timeline) RemoveCurrent

func (tl *Timeline) RemoveCurrent(quit bool) bool

func (*Timeline) ScrollDown

func (tl *Timeline) ScrollDown()

func (*Timeline) ScrollUp

func (tl *Timeline) ScrollUp()

func (*Timeline) SetItemFeedIndex

func (tl *Timeline) SetItemFeedIndex(index int)

type TimelineFocusAt

type TimelineFocusAt uint
const (
	FeedFocus TimelineFocusAt = iota
	NotificationFocus
)

type Toot

type Toot struct {
	Visibility         string
	Boosted            bool
	BoostedDisplayName string
	BoostedAcct        string
	Bookmarked         bool
	AccountDisplayName string
	Account            string
	Spoiler            bool
	CWText             string
	SpoilerText        string
	ShowSpoiler        bool
	CWlabel            string
	ContentText        string
	Width              int
	HasExtra           bool
	Poll               Poll
	Media              []Media
	Card               Card
	Replies            int
	Boosts             int
	Favorites          int
	Edited             bool
	Lang               string
	Controls           string
}

type Top

type Top struct {
	TutView *TutView
	View    *tview.TextView
}

func NewTop

func NewTop(tv *TutView) *Top

func (*Top) SetText

func (t *Top) SetText(s string)

type Tut

type Tut struct {
	Client *api.AccountClient
	App    *tview.Application
	Config *config.Config
}

type TutView

type TutView struct {
	Timeline      *Timeline
	PageFocus     PageFocusAt
	PrevPageFocus PageFocusAt
	SubFocus      SubFocusAt
	Leader        *Leader
	Shared        *Shared
	View          *tview.Pages

	LoginView      *LoginView
	MainView       *MainView
	LinkView       *LinkView
	ComposeView    *ComposeView
	VoteView       *VoteView
	PollView       *PollView
	PreferenceView *PreferenceView
	HelpView       *HelpView
	EditorView     *EditorView
	ModalView      *ModalView

	FileList []string
	// contains filtered or unexported fields
}

func (*TutView) BlockingCommand

func (tv *TutView) BlockingCommand()

func (*TutView) BookmarksCommand

func (tv *TutView) BookmarksCommand()

func (*TutView) BoostsCommand

func (tv *TutView) BoostsCommand()

func (*TutView) CleanExit

func (tv *TutView) CleanExit(code int)

func (*TutView) ClearNotificationsCommand

func (tv *TutView) ClearNotificationsCommand()

func (*TutView) ClearTemp

func (tv *TutView) ClearTemp()

func (*TutView) ClosePaneCommand

func (tv *TutView) ClosePaneCommand()

func (*TutView) ComposeCommand

func (tv *TutView) ComposeCommand()

func (*TutView) DirectCommand

func (tv *TutView) DirectCommand()

func (*TutView) EditCommand

func (tv *TutView) EditCommand()

func (*TutView) FavoritedCommand

func (tv *TutView) FavoritedCommand()

func (*TutView) FavoritesCommand

func (tv *TutView) FavoritesCommand()

func (*TutView) FederatedCommand

func (tv *TutView) FederatedCommand()

func (*TutView) FocusFeed

func (tv *TutView) FocusFeed(index int, ct *config.Timeline)

func (*TutView) FocusMainNoHistory

func (tv *TutView) FocusMainNoHistory()

func (*TutView) FollowRequestsCommand

func (tv *TutView) FollowRequestsCommand()

func (*TutView) FollowersCommand

func (tv *TutView) FollowersCommand()

func (*TutView) FollowingCommand

func (tv *TutView) FollowingCommand()

func (*TutView) GetCurrentFeed

func (tv *TutView) GetCurrentFeed() *Feed

func (*TutView) GetCurrentItem

func (tv *TutView) GetCurrentItem() (api.Item, error)

func (*TutView) HistoryCommand

func (tv *TutView) HistoryCommand()

func (*TutView) HomeCommand

func (tv *TutView) HomeCommand()

func (*TutView) InitPost

func (tv *TutView) InitPost(status *mastodon.Status, original *mastodon.Status)

func (*TutView) Input

func (tv *TutView) Input(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputCmdView

func (tv *TutView) InputCmdView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputComposeView

func (tv *TutView) InputComposeView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputEditorView

func (tv *TutView) InputEditorView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputHelp

func (tv *TutView) InputHelp(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputItem

func (tv *TutView) InputItem(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputLeaderKey

func (tv *TutView) InputLeaderKey(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputLinkView

func (tv *TutView) InputLinkView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputList

func (tv *TutView) InputList(event *tcell.EventKey, list *mastodon.List) *tcell.EventKey

func (*TutView) InputLoginView

func (tv *TutView) InputLoginView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputMainView

func (tv *TutView) InputMainView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputMainViewContent

func (tv *TutView) InputMainViewContent(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputMainViewFeed

func (tv *TutView) InputMainViewFeed(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputMedia

func (tv *TutView) InputMedia(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputMediaAdd

func (tv *TutView) InputMediaAdd(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputPollView

func (tv *TutView) InputPollView(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputPreference

func (tv *TutView) InputPreference(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputPreferenceFields

func (tv *TutView) InputPreferenceFields(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputStatus

func (tv *TutView) InputStatus(event *tcell.EventKey, item api.Item, status *mastodon.Status, nAcc *mastodon.Account, fd config.FeedType) *tcell.EventKey

func (*TutView) InputStatusHistory

func (tv *TutView) InputStatusHistory(event *tcell.EventKey, item api.Item, sr *mastodon.StatusHistory, nAcc *mastodon.Account) *tcell.EventKey

func (*TutView) InputTag

func (tv *TutView) InputTag(event *tcell.EventKey, tag *mastodon.Tag) *tcell.EventKey

func (*TutView) InputUser

func (tv *TutView) InputUser(event *tcell.EventKey, user *api.User, ut InputUserType) *tcell.EventKey

func (*TutView) InputViewItem

func (tv *TutView) InputViewItem(event *tcell.EventKey) *tcell.EventKey

func (*TutView) InputVote

func (tv *TutView) InputVote(event *tcell.EventKey) *tcell.EventKey

func (*TutView) ListPlacementCommand

func (tv *TutView) ListPlacementCommand(lp config.ListPlacement)

func (*TutView) ListSplitCommand

func (tv *TutView) ListSplitCommand(ls config.ListSplit)

func (*TutView) ListsCommand

func (tv *TutView) ListsCommand()

func (*TutView) LoadNewerCommand

func (tv *TutView) LoadNewerCommand()

func (*TutView) LocalCommand

func (tv *TutView) LocalCommand()

func (*TutView) LoginCommand

func (tv *TutView) LoginCommand()

func (*TutView) MentionsCommand

func (tv *TutView) MentionsCommand()

func (*TutView) MouseInput

func (tv *TutView) MouseInput(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputComposeView

func (tv *TutView) MouseInputComposeView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputHelpView

func (tv *TutView) MouseInputHelpView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputLinkView

func (tv *TutView) MouseInputLinkView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputLoginView

func (tv *TutView) MouseInputLoginView(event *tcell.EventMouse, action tview.MouseAction)

func (*TutView) MouseInputMainView

func (tv *TutView) MouseInputMainView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputMediaView

func (tv *TutView) MouseInputMediaView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputModalView

func (tv *TutView) MouseInputModalView(event *tcell.EventMouse, action tview.MouseAction)

func (*TutView) MouseInputPollView

func (tv *TutView) MouseInputPollView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputPreferenceView

func (tv *TutView) MouseInputPreferenceView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MouseInputVoteView

func (tv *TutView) MouseInputVoteView(event *tcell.EventMouse, action tview.MouseAction) (*tcell.EventMouse, tview.MouseAction)

func (*TutView) MovePaneEnd

func (tv *TutView) MovePaneEnd()

func (*TutView) MovePaneHome

func (tv *TutView) MovePaneHome()

func (*TutView) MovePaneLeft

func (tv *TutView) MovePaneLeft()

func (*TutView) MovePaneRight

func (tv *TutView) MovePaneRight()

func (*TutView) MutingCommand

func (tv *TutView) MutingCommand()

func (*TutView) NextAcct

func (tv *TutView) NextAcct()

func (*TutView) NextFeed

func (tv *TutView) NextFeed()

func (*TutView) NotificationsCommand

func (tv *TutView) NotificationsCommand()

func (*TutView) PaneCommand

func (tv *TutView) PaneCommand(index string)

func (*TutView) PreferencesCommand

func (tv *TutView) PreferencesCommand()

func (*TutView) PrevAcct

func (tv *TutView) PrevAcct()

func (*TutView) PrevFeed

func (tv *TutView) PrevFeed()

func (*TutView) PrevFocus

func (tv *TutView) PrevFocus()

func (*TutView) ProfileCommand

func (tv *TutView) ProfileCommand()

func (*TutView) ProportionsCommand

func (tv *TutView) ProportionsCommand(lp string, cp string)

func (*TutView) RedrawContent

func (tv *TutView) RedrawContent()

func (*TutView) RedrawControls

func (tv *TutView) RedrawControls()

func (*TutView) RedrawPoll

func (tv *TutView) RedrawPoll(poll *mastodon.Poll)

func (*TutView) RefetchCommand

func (tv *TutView) RefetchCommand()

func (*TutView) SetPage

func (tv *TutView) SetPage(f PageFocusAt)

func (*TutView) ShouldSync

func (tv *TutView) ShouldSync()

func (*TutView) ShowError

func (tv *TutView) ShowError(s string)

func (*TutView) SpecialCommand

func (tv *TutView) SpecialCommand(hideBoosts, hideReplies bool)

func (*TutView) TagCommand

func (tv *TutView) TagCommand(tag string)

func (*TutView) TagFollowCommand

func (tv *TutView) TagFollowCommand(tag string)

func (*TutView) TagUnfollowCommand

func (tv *TutView) TagUnfollowCommand(tag string)

func (*TutView) TagsCommand

func (tv *TutView) TagsCommand()

func (*TutView) ToggleStickToTop

func (tv *TutView) ToggleStickToTop()

type TutViewsHolder

type TutViewsHolder struct {
	Views   []*TutView
	Current int
}
var TutViews *TutViewsHolder

func (*TutViewsHolder) Next

func (tvh *TutViewsHolder) Next()

func (*TutViewsHolder) Prev

func (tvh *TutViewsHolder) Prev()

func (*TutViewsHolder) SetFocusedTutView

func (tvh *TutViewsHolder) SetFocusedTutView(index int)

type UploadFile

type UploadFile struct {
	Path        string
	Description string
	Remote      bool
	ID          mastodon.ID
}

type User

type User struct {
	Username       string
	Account        string
	DisplayName    string
	Locked         bool
	CreatedAt      time.Time
	FollowersCount int64
	FollowingCount int64
	StatusCount    int64
	Note           string
	URL            string
	Avatar         string
	AvatarStatic   string
	Header         string
	HeaderStatic   string
	Fields         []Field
	Bot            bool
}

type ViewMode

type ViewMode uint
const (
	CmdMode ViewMode = iota
	ComposeMode
	HelpMode
	EditorMode
	LinkMode
	ListMode
	MediaMode
	NotificationsMode
	ScrollMode
	UserMode
	VoteMode
	PollMode
	PreferenceMode
)

type VoteView

type VoteView struct {
	View *tview.Flex
	// contains filtered or unexported fields
}

func NewVoteView

func NewVoteView(tv *TutView) *VoteView

func (*VoteView) Next

func (v *VoteView) Next()

func (*VoteView) Prev

func (v *VoteView) Prev()

func (*VoteView) Select

func (v *VoteView) Select()

func (*VoteView) SetPoll

func (v *VoteView) SetPoll(poll *mastodon.Poll)

func (*VoteView) ToggleSelect

func (v *VoteView) ToggleSelect()

func (*VoteView) Unselect

func (v *VoteView) Unselect()

func (*VoteView) Vote

func (v *VoteView) Vote()

Jump to

Keyboard shortcuts

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