Documentation ¶
Overview ¶
nolint
Index ¶
- Constants
- Variables
- func Bookmarks(t *tab)
- func CloseTab()
- func Error(title, text string)
- func Help()
- func Info(s string)
- func Init(version, commit, builtBy string)
- func Input(prompt string, sensitive bool) (string, bool)
- func ManageSubscriptions(t *tab, u string)
- func NewTab()
- func NewTabWithURL(url string)
- func NumTabs() int
- func Reload()
- func RenderFromString(str string)
- func Stop()
- func Subscriptions(t *tab, u string) string
- func SwitchTab(tab int)
- func Tofu(host string, expiry time.Time) bool
- func URL(u string)
- func YesNo(prompt string) bool
Constants ¶
const ( PanelBrowser = "browser" PanelBookmarks = "bkmk" PanelDownload = "dl" PanelDownloadChoiceModal = "dlChoice" PanelHelp = "help" PanelYesNoModal = "yesno" PanelInfoModal = "info" PanelErrorModal = "error" PanelInputModal = "input" )
Variables ¶
var App = cview.NewApplication()
Functions ¶
func CloseTab ¶
func CloseTab()
CloseTab closes the current tab and switches to the one to its left.
func Error ¶
func Error(title, text string)
Error displays an error on the screen in a modal, and blocks until dismissed by the user.
func Info ¶
func Info(s string)
Info displays some info on the screen in a modal, and blocks until dismissed by the user.
func Input ¶
Input pulls up a modal that asks for input, waits for that input, and returns it. It returns an bool indicating if the user chose to send input or not.
func ManageSubscriptions ¶
func ManageSubscriptions(t *tab, u string)
ManageSubscriptions displays the subscription managing page in the current tab. `u` is the URL entered by the user.
func NewTab ¶
func NewTab()
NewTab opens a new tab and switches to it, displaying the the default empty content because there's no URL.
func NewTabWithURL ¶
func NewTabWithURL(url string)
NewTabWithURL opens a new tab and switches to it, displaying the the URL provided.
func RenderFromString ¶
func RenderFromString(str string)
func Stop ¶
func Stop()
Stop stops the app gracefully. In the future it will handle things like ongoing downloads, etc
func Subscriptions ¶
Subscriptions displays the subscriptions page on the current tab.
func SwitchTab ¶
func SwitchTab(tab int)
SwitchTab switches to a specific tab, using its number, 0-indexed. The tab numbers are clamped to the end, so for example numbers like -5 and 1000 are still valid. This means that calling something like SwitchTab(curTab - 1) will never cause an error.
func Tofu ¶
Tofu displays the TOFU warning modal. It blocks then returns a bool indicating whether the user wants to continue.
Types ¶
This section is empty.