Documentation ¶
Overview ¶
Copyright 2020 The Mellium Contributors. Use of this source code is governed by the BSD 2-clause license that can be found in the LICENSE file.
Package ui ties together various widgets to create the main Communiqué UI.
Index ¶
- Constants
- type BookmarkItem
- type Bookmarks
- func (b Bookmarks) Blur()
- func (b Bookmarks) Delete(bareJID string)
- func (b Bookmarks) Draw(screen tcell.Screen)
- func (b Bookmarks) Focus(delegate func(p tview.Primitive))
- func (b Bookmarks) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
- func (b Bookmarks) GetItem(j string) (BookmarkItem, bool)
- func (b Bookmarks) GetRect() (int, int, int, int)
- func (b Bookmarks) GetSelected() (BookmarkItem, bool)
- func (b Bookmarks) HasFocus() bool
- func (b Bookmarks) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (b Bookmarks) Len() int
- func (b Bookmarks) MouseHandler() ...
- func (b *Bookmarks) OnChanged(f func(int, string, string, rune))
- func (Bookmarks) PasteHandler() func(string, func(tview.Primitive))
- func (b Bookmarks) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Box
- func (b Bookmarks) SetRect(x, y, width, height int)
- func (b Bookmarks) ShowStatus(show bool)
- func (b Bookmarks) Upsert(bookmark bookmarks.Channel, action func())
- type Conversation
- type ConversationView
- func (cv *ConversationView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (cv *ConversationView) ScrollTo(row, column int)
- func (cv *ConversationView) ScrollToBeginning()
- func (cv *ConversationView) ScrollToEnd()
- func (cv *ConversationView) ScrollToHighlight()
- func (cv *ConversationView) ShowFilePicker()
- func (cv *ConversationView) ShowInput()
- type Conversations
- func (c Conversations) Blur()
- func (c Conversations) Delete(bareJID string)
- func (c Conversations) Draw(screen tcell.Screen)
- func (c Conversations) Focus(delegate func(p tview.Primitive))
- func (c Conversations) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
- func (c Conversations) GetItem(j string) (Conversation, bool)
- func (c Conversations) GetRect() (int, int, int, int)
- func (c Conversations) GetSelected() (Conversation, bool)
- func (c Conversations) HasFocus() bool
- func (c Conversations) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (c *Conversations) Len() int
- func (c Conversations) MarkRead(j string)
- func (c Conversations) MarkUnread(j, msgID string) bool
- func (c Conversations) MouseHandler() ...
- func (c *Conversations) OnChanged(f func(int, string, string, rune))
- func (Conversations) PasteHandler() func(string, func(tview.Primitive))
- func (c Conversations) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Box
- func (c Conversations) SetRect(x, y, width, height int)
- func (c *Conversations) ShowStatus(show bool)
- func (c Conversations) Unread(j string) bool
- func (c Conversations) Upsert(item Conversation, action func(Conversation)) int
- func (c Conversations) UpsertPresence(j jid.JID, status string) bool
- type Modal
- func (m *Modal) AddButtons(labels []string) *Modal
- func (m *Modal) AddInputField(label, value string, fieldWidth int, ...)
- func (m *Modal) ClearButtons() *Modal
- func (m *Modal) Draw(screen tcell.Screen)
- func (m *Modal) Focus(delegate func(p tview.Primitive))
- func (m *Modal) Form() *tview.Form
- func (m *Modal) HasFocus() bool
- func (m *Modal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *Modal) MouseHandler() ...
- func (m *Modal) SetBackgroundColor(color tcell.Color) *Modal
- func (m *Modal) SetButtonBackgroundColor(color tcell.Color) *Modal
- func (m *Modal) SetButtonTextColor(color tcell.Color) *Modal
- func (m *Modal) SetDoneFunc(handler func(buttonIndex int, buttonLabel string)) *Modal
- func (m *Modal) SetFocus(index int) *Modal
- func (m *Modal) SetText(text string) *Modal
- func (m *Modal) SetTextColor(color tcell.Color) *Modal
- type Option
- type Roster
- func (r Roster) Blur()
- func (r Roster) Delete(bareJID string)
- func (r Roster) Draw(screen tcell.Screen)
- func (r Roster) Focus(delegate func(p tview.Primitive))
- func (r Roster) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
- func (r Roster) GetItem(j string) (RosterItem, bool)
- func (r Roster) GetRect() (int, int, int, int)
- func (r Roster) GetSelected() (RosterItem, bool)
- func (r Roster) HasFocus() bool
- func (r Roster) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (r *Roster) Len() int
- func (r Roster) MarkRead(j string)
- func (r Roster) MarkUnread(j, msgID string) bool
- func (r Roster) MouseHandler() ...
- func (r *Roster) OnChanged(f func(int, string, string, rune))
- func (Roster) PasteHandler() func(string, func(tview.Primitive))
- func (r Roster) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Box
- func (r Roster) SetRect(x, y, width, height int)
- func (r *Roster) ShowStatus(show bool)
- func (r Roster) Unread(j string) bool
- func (r Roster) Upsert(item RosterItem, action func())
- func (r Roster) UpsertPresence(j jid.JID, status string) bool
- type RosterItem
- type SearchDir
- type Sidebar
- func (s Sidebar) Away()
- func (s Sidebar) Busy()
- func (s *Sidebar) GetSelected() (interface{}, bool)
- func (s *Sidebar) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (s *Sidebar) MarkRead(j string)
- func (s *Sidebar) MarkUnread(j, msgID string) bool
- func (s Sidebar) Offline()
- func (s Sidebar) Online()
- func (s *Sidebar) Search(q string, dir SearchDir) bool
- func (s *Sidebar) SetWidth(width int)
- func (s *Sidebar) ShowStatus(show bool)
- func (s Sidebar) UpsertPresence(j jid.JID, status string) bool
- type UI
- func (ui *UI) Away(j jid.JID, self bool)
- func (ui *UI) Bookmarks() *Bookmarks
- func (ui *UI) Busy(j jid.JID, self bool)
- func (ui *UI) ChatsOpen() bool
- func (ui *UI) Conversations() *Conversations
- func (ui *UI) FilePicker() ([]string, error)
- func (ui *UI) FilePickerConfigured() bool
- func (ui *UI) GetRect() (x, y, width, height int)
- func (ui *UI) GetRosterJID() jid.JID
- func (ui *UI) Handle(handler func(interface{}))
- func (ui *UI) History() *tview.TextView
- func (ui *UI) MarkRead(j string)
- func (ui *UI) MarkUnread(j, msgID string) bool
- func (ui *UI) Notify()
- func (ui *UI) Offline(j jid.JID, self bool)
- func (ui *UI) Online(j jid.JID, self bool)
- func (ui *UI) PickResource(f func(jid.JID, bool))
- func (ui *UI) Printer() *message.Printer
- func (ui *UI) Redraw()
- func (ui *UI) Roster() *Roster
- func (ui *UI) RosterLen() int
- func (ui *UI) Run() error
- func (ui *UI) SelectRoster()
- func (ui *UI) SetCommands(j jid.JID, c []commands.Command)
- func (ui *UI) ShowAddBookmark()
- func (ui *UI) ShowAddRoster()
- func (ui *UI) ShowForm(formData *form.Data, buttons []string, onDone func(string))
- func (ui *UI) ShowHelpPrompt()
- func (ui *UI) ShowLoadCmd(j jid.JID)
- func (ui *UI) ShowManualPage()
- func (ui *UI) ShowNote(note commands.Note, buttons []string, onDone func(string))
- func (ui *UI) ShowPasswordPrompt() string
- func (ui *UI) ShowQuitPrompt()
- func (ui *UI) ShowRosterInfo()
- func (ui *UI) Stop()
- func (ui *UI) UpdateBookmarks(item bookmarks.Channel)
- func (ui *UI) UpdateConversations(c Conversation)
- func (ui *UI) UpdateRoster(item RosterItem)
- func (ui *UI) Write(p []byte) (n int, err error)
Constants ¶
const UnreadRegion = "unreadMarker"
UnreadRegion is a tview region tag that will draw an unread marker.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookmarkItem ¶
BookmarkItem represents a bookmark in the list.
type Bookmarks ¶
type Bookmarks struct { Width int // contains filtered or unexported fields }
Bookmarks is a tview.Primitive that draws a list of bookmarks.
func (Bookmarks) Draw ¶
func (b Bookmarks) Draw(screen tcell.Screen)
Draw implements tview.Primitive.
func (Bookmarks) GetInputCapture ¶
func (b Bookmarks) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
GetInputCapture returns the input capture function for the underlying list.
func (Bookmarks) GetItem ¶
func (b Bookmarks) GetItem(j string) (BookmarkItem, bool)
GetItem returns the item for the given JID.
func (Bookmarks) GetSelected ¶
func (b Bookmarks) GetSelected() (BookmarkItem, bool)
GetSelected returns the currently selected bookmark.
func (Bookmarks) InputHandler ¶
InputHandler implements tview.Primitive.
func (Bookmarks) MouseHandler ¶
func (b Bookmarks) MouseHandler() func(tview.MouseAction, *tcell.EventMouse, func(tview.Primitive)) (bool, tview.Primitive)
MouseHandler implements tview.Primitive.
func (Bookmarks) PasteHandler ¶
PasteHandler implements tview.Primitive.
func (Bookmarks) SetInputCapture ¶
SetInputCapture passes calls through to the underlying view(s).
func (Bookmarks) ShowStatus ¶
ShowStatus shows or hides the status line under bookmarks in the list.
type Conversation ¶
type Conversation struct { JID jid.JID Name string Room bool // contains filtered or unexported fields }
Conversation represents an open channel or chat.
func (Conversation) FirstUnread ¶
func (c Conversation) FirstUnread() string
FirstUnread returns the ID of the first unread message.
type ConversationView ¶
type ConversationView struct { *tview.Flex TextView *tview.TextView // contains filtered or unexported fields }
ConversationView is a wrapper around TextView that adds other functionality important for displaying chats.
func NewConversationView ¶
func NewConversationView(ui *UI) *ConversationView
NewConversationView configures and creates a new chat view.
func (*ConversationView) InputHandler ¶
func (cv *ConversationView) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns the handler for this primitive.
func (*ConversationView) ScrollTo ¶
func (cv *ConversationView) ScrollTo(row, column int)
ScrollTo scrolls to the specified row and column (both starting with 0).
func (*ConversationView) ScrollToBeginning ¶
func (cv *ConversationView) ScrollToBeginning()
ScrollToBeginning scrolls to the top left corner of the text if the text view is scrollable.
func (*ConversationView) ScrollToEnd ¶
func (cv *ConversationView) ScrollToEnd()
ScrollToEnd scrolls to the bottom left corner of the text if the text view is scrollable. Adding new rows to the end of the text view will cause it to scroll with the new data.
func (*ConversationView) ScrollToHighlight ¶
func (cv *ConversationView) ScrollToHighlight()
ScrollToHighlight will cause the visible area to be scrolled so that the highlighted regions appear in the visible area of the text view. This repositioning happens the next time the text view is drawn. It happens only once so you will need to call this function repeatedly to always keep highlighted regions in view.
Nothing happens if there are no highlighted regions or if the text view is not scrollable.
func (*ConversationView) ShowFilePicker ¶
func (cv *ConversationView) ShowFilePicker()
ShowFilePicker shows the file picker field.
func (*ConversationView) ShowInput ¶
func (cv *ConversationView) ShowInput()
ShowInput shows the text input field.
type Conversations ¶
type Conversations struct { Width int // contains filtered or unexported fields }
Conversations is a tview.Primitive that draws the recent/open conversations. This pane includes a mix of joined channels and recently updated 1:1 chats. It does not necessarily contain all bookmarked channels or all chats from the roster (in fact, it may include channels or chats that are not bookmarked or not in the roster).
func (Conversations) Blur ¶
func (c Conversations) Blur()
Blur implements tview.Primitive foc Conversations.
func (Conversations) Delete ¶
func (c Conversations) Delete(bareJID string)
Delete removes an item from the list.
func (Conversations) Draw ¶
func (c Conversations) Draw(screen tcell.Screen)
Draw implements tview.Primitive foc Conversations.
func (Conversations) Focus ¶
func (c Conversations) Focus(delegate func(p tview.Primitive))
Focus implements tview.Primitive foc Conversations.
func (Conversations) GetInputCapture ¶
func (c Conversations) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
GetInputCapture returns the input capture function for the underlying list.
func (Conversations) GetItem ¶
func (c Conversations) GetItem(j string) (Conversation, bool)
GetItem returns the item for the given JID.
func (Conversations) GetRect ¶
func (c Conversations) GetRect() (int, int, int, int)
GetRect implements tview.Primitive foc Conversations.
func (Conversations) GetSelected ¶
func (c Conversations) GetSelected() (Conversation, bool)
GetSelected returns the currently selected roster item.
func (Conversations) HasFocus ¶
func (c Conversations) HasFocus() bool
HasFocus implements tview.Primitive foc Conversations.
func (Conversations) InputHandler ¶
func (c Conversations) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler implements tview.Primitive foc Conversations.
func (Conversations) MarkRead ¶
func (c Conversations) MarkRead(j string)
MarkRead sets the given jid back to the normal font.
func (Conversations) MarkUnread ¶
func (c Conversations) MarkUnread(j, msgID string) bool
MarkUnread sets the given jid to bold and sets the first message seen after the unread marker (unless the unread marker is already set).
func (Conversations) MouseHandler ¶
func (c Conversations) MouseHandler() func(tview.MouseAction, *tcell.EventMouse, func(tview.Primitive)) (bool, tview.Primitive)
MouseHandler implements tview.Primitive foc Conversations.
func (*Conversations) OnChanged ¶
func (c *Conversations) OnChanged(f func(int, string, string, rune))
OnChanged sets a callback for when the user navigates to a roster item.
func (Conversations) PasteHandler ¶
func (Conversations) PasteHandler() func(string, func(tview.Primitive))
PasteHandler implements tview.Primitive.
func (Conversations) SetInputCapture ¶
func (c Conversations) SetInputCapture(capture func(event *tcell.EventKey) *tcell.EventKey) *tview.Box
SetInputCapture passes calls through to the underlying view(s).
func (Conversations) SetRect ¶
func (c Conversations) SetRect(x, y, width, height int)
SetRect implements tview.Primitive foc Conversations.
func (*Conversations) ShowStatus ¶
func (c *Conversations) ShowStatus(show bool)
ShowStatus shows or hides the status line under contacts in the roster.
func (Conversations) Unread ¶
func (c Conversations) Unread(j string) bool
Unread returns whether the roster item is currently marked as having unread messages. If no such roster item exists, it returns false.
func (Conversations) Upsert ¶
func (c Conversations) Upsert(item Conversation, action func(Conversation)) int
Upsert inserts or updates an item in the list.
func (Conversations) UpsertPresence ¶
func (c Conversations) UpsertPresence(j jid.JID, status string) bool
UpsertPresence updates an existing roster item with a newly seen resource or presence change. If the item is not in the roster, false is returned.
type Modal ¶
Modal is a centered message window used to inform the user or prompt them for an immediate decision. It needs to have at least one button (added via AddButtons()) or it will never disappear.
See https://github.com/rivo/tview/wiki/Modal for an example.
func (*Modal) AddButtons ¶
AddButtons adds buttons to the window. There must be at least one button and a "done" handler so the window can be closed again.
func (*Modal) AddInputField ¶
func (m *Modal) AddInputField(label, value string, fieldWidth int, accept func(textToCheck string, lastChar rune) bool, changed func(text string))
AddInputField adds an input field to the form.
func (*Modal) ClearButtons ¶
ClearButtons removes all buttons from the window.
func (*Modal) Draw ¶
func (m *Modal) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*Modal) Form ¶
Form returns the internal form used to add buttons and other elements to the modal.
func (*Modal) InputHandler ¶
InputHandler returns the handler for this primitive.
func (*Modal) MouseHandler ¶
func (m *Modal) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
MouseHandler returns the mouse handler for this primitive.
func (*Modal) SetBackgroundColor ¶
SetBackgroundColor sets the color of the modal frame background.
func (*Modal) SetButtonBackgroundColor ¶
SetButtonBackgroundColor sets the background color of the buttons.
func (*Modal) SetButtonTextColor ¶
SetButtonTextColor sets the color of the button texts.
func (*Modal) SetDoneFunc ¶
SetDoneFunc sets a handler which is called when one of the buttons was pressed. It receives the index of the button as well as its label text. The handler is also called when the user presses the Escape key. The index will then be negative and the label text an emptry string.
func (*Modal) SetText ¶
SetText sets the message text of the window. The text may contain line breaks. Note that words are wrapped, too, based on the final size of the window.
func (*Modal) SetTextColor ¶
SetTextColor sets the color of the message text.
type Option ¶
type Option func(*UI)
Option can be used to configure a new roster widget.
func Addr ¶
Addr returns an option that sets the users address anywhere that it is displayed in the UI.
func Handle ¶
func Handle(handler func(event interface{})) Option
Handle returns an option that configures an event handler which will be called when the user performs certain actions in the UI. Only one event handler can be registered, and subsequent calls to Handle will replace the handler. The function will be called synchronously on the UI goroutine, so don't do any intensive work (or, if you must, launch a new goroutine).
func RosterWidth ¶
RosterWidth returns an option that sets the width of the roster. It accepts a minimum of 2 and a max of 50 the default is 25.
func ShowStatus ¶
ShowStatus returns an option that shows or hides the status line under contacts in the roster.
type Roster ¶
type Roster struct { Width int // contains filtered or unexported fields }
Roster is a tview.Primitive that draws a roster pane.
func (Roster) Draw ¶
func (r Roster) Draw(screen tcell.Screen)
Draw implements tview.Primitive for Roster.
func (Roster) GetInputCapture ¶
func (r Roster) GetInputCapture() func(event *tcell.EventKey) *tcell.EventKey
GetInputCapture returns the input capture function for the underlying list.
func (Roster) GetItem ¶
func (r Roster) GetItem(j string) (RosterItem, bool)
GetItem returns the item for the given JID.
func (Roster) GetSelected ¶
func (r Roster) GetSelected() (RosterItem, bool)
GetSelected returns the currently selected roster item.
func (Roster) InputHandler ¶
InputHandler implements tview.Primitive for Roster.
func (Roster) MarkUnread ¶
MarkUnread sets the given jid to bold and sets the first message seen after the unread marker (unless the unread marker is already set).
func (Roster) MouseHandler ¶
func (r Roster) MouseHandler() func(tview.MouseAction, *tcell.EventMouse, func(tview.Primitive)) (bool, tview.Primitive)
MouseHandler implements tview.Primitive for Roster.
func (Roster) PasteHandler ¶
PasteHandler implements tview.Primitive.
func (Roster) SetInputCapture ¶
SetInputCapture passes calls through to the underlying view(s).
func (*Roster) ShowStatus ¶
ShowStatus shows or hides the status line under contacts in the roster.
func (Roster) Unread ¶
Unread returns whether the roster item is currently marked as having unread messages. If no such roster item exists, it returns false.
func (Roster) Upsert ¶
func (r Roster) Upsert(item RosterItem, action func())
Upsert inserts or updates an item in the roster.
type RosterItem ¶
RosterItem represents a contact in the roster.
func (RosterItem) FirstUnread ¶
func (r RosterItem) FirstUnread() string
FirstUnread returns the ID of the first unread message.
type Sidebar ¶
Sidebar is a tview.Primitive that draws a sidebar containing multiple lists that can be toggled between using a drop down.
func (Sidebar) Away ¶
func (s Sidebar) Away()
Away sets the state of the roster to show the user as away.
func (Sidebar) Busy ¶
func (s Sidebar) Busy()
Busy sets the state of the roster to show the user as busy.
func (*Sidebar) GetSelected ¶
GetSelected returns the currently selected roster item, bookmark, or conversation.
func (*Sidebar) InputHandler ¶
InputHandler implements tview.Primitive for Roster.
func (*Sidebar) MarkRead ¶
MarkRead sets the given jid back to the normal font in whatever views it appears in.
func (*Sidebar) MarkUnread ¶
MarkUnread sets the given jid to bold and sets the first message seen after the unread marker (unless the unread marker is already set).
func (Sidebar) Offline ¶
func (s Sidebar) Offline()
Offline sets the state of the roster to show the user as offline.
func (Sidebar) Online ¶
func (s Sidebar) Online()
Online sets the state of the roster to show the user as online.
func (*Sidebar) Search ¶
Search looks forward in the roster trying to find items that match s. It is case insensitive and looks in the primary or secondary texts. If a match is found after the current selection, we jump to the match, wrapping at the end of the list.
func (*Sidebar) SetWidth ¶
SetWidth sets the width of the sidebar and re-adjusts the dropdown text width to match.
func (*Sidebar) ShowStatus ¶
ShowStatus shows or hides the status line under the currently selected list.
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
UI is a widget that combines other widgets to make the main UI.
func (*UI) Conversations ¶
func (ui *UI) Conversations() *Conversations
Conversations returns the recent conversations widget.
func (*UI) FilePicker ¶
FilePicker runs the file picker and returns the list of selected paths.
func (*UI) FilePickerConfigured ¶
FilePickerConfigured returns whether an external file picker has been configured or not.
func (*UI) GetRect ¶
GetRect returns the size of the UI on the screen (including borders and bounding boxes).
func (*UI) GetRosterJID ¶
GetRosterJID gets the currently selected roster or bookmark JID. If no JID is selected, the zero value is returned.
func (*UI) Handle ¶
func (ui *UI) Handle(handler func(interface{}))
Handle configures an event handler which will be called when the user performs certain actions in the UI. Only one event handler can be registered, and subsequent calls to Handle will replace the handler. The function will be called synchronously on the UI goroutine, so don't do any intensive work (or launch a new goroutine if you must).
func (*UI) History ¶
History returns the chat history view. To flush any remaining data to the buffer, the writer must be closed after use.
func (*UI) MarkRead ¶
MarkRead sets the given jid back to the normal font in whatever views it appears in.
func (*UI) MarkUnread ¶
MarkUnread sets the given jid to bold and sets the first message seen after the unread marker (unless the unread marker is already set).
func (*UI) PickResource ¶
PickResource shows a modal with the currently selected roster items resources and lets the user pick one. It then calls f with the full JID and whether or not picking a resource was successful.
func (*UI) SelectRoster ¶
func (ui *UI) SelectRoster()
SelectRoster moves the input selection back to the roster and shows the logs view.
func (*UI) SetCommands ¶
SetCommands populates the list of ad-hoc commands in the list commands window. It should generally be called after the commands have been loaded and after the "ShowListCMD" function has been called (since that sets the text to a loading indicator).
func (*UI) ShowAddBookmark ¶
func (ui *UI) ShowAddBookmark()
ShowAddBookmark asks the user for a new JID.
func (*UI) ShowHelpPrompt ¶
func (ui *UI) ShowHelpPrompt()
ShowHelpPrompt shows a list of keyboard shortcuts..
func (*UI) ShowLoadCmd ¶
ShowLoadCmd shows available ad-hoc commands for the selected JID.
func (*UI) ShowManualPage ¶
func (ui *UI) ShowManualPage()
ShowManualPage suspends the application and invokes man(1) to view the manual page.
func (*UI) ShowPasswordPrompt ¶
ShowPasswordPrompt displays a modal and blocks until the user enters a password and submits it.
func (*UI) ShowQuitPrompt ¶
func (ui *UI) ShowQuitPrompt()
ShowQuitPrompt asks if the user wants to quit the application.
func (*UI) ShowRosterInfo ¶
func (ui *UI) ShowRosterInfo()
ShowRosterInfo displays more info about the currently selected roster item.
func (*UI) UpdateBookmarks ¶
UpdateBookmarks adds an item to the bookmarks sidebar.
func (*UI) UpdateConversations ¶
func (ui *UI) UpdateConversations(c Conversation)
UpdateConversations adds a roster item to the recent conversations list.
func (*UI) UpdateRoster ¶
func (ui *UI) UpdateRoster(item RosterItem)
UpdateRoster adds an item to the roster.