Documentation ¶
Index ¶
- Variables
- func Bookmarks()
- func CloseTab()
- func Error(title, text string)
- func Help()
- func Info(s string)
- func Init()
- func Input(prompt string) (string, bool)
- func NewTab()
- func NumTabs() int
- func Reload()
- func Stop()
- func SwitchTab(tab int)
- func Tofu(host string) bool
- func URL(u string)
- func YesNo(prompt string) bool
Constants ¶
This section is empty.
Variables ¶
var App = cview.NewApplication(). EnableMouse(false). SetRoot(layout, true). SetAfterResizeFunc(func(width int, height int) { termW = width termH = height if tabMap[curTab] == &newTabPage { renderedNewTabContent, _ = renderer.RenderGemini(newTabContent, textWidth()) newTabPage.Content = renderedNewTabContent newTabPage.LeftMargin = 0 setLeftMargin(tabMap[curTab]) tabViews[curTab].SetText(tabMap[curTab].Content) } })
Functions ¶
func Bookmarks ¶ added in v1.1.0
func Bookmarks()
Bookmarks displays the bookmarks page on the current tab.
func CloseTab ¶
func CloseTab()
CloseTab closes the current tab and switches to the one to its left.
func Input ¶
Input pulls up a modal that asks for input, and returns the user's input. It returns an bool indicating if the user chose to send input or not.
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 Stop ¶
func Stop()
Stop stops the app gracefully. In the future it will handle things like ongoing downloads, etc
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 ¶ added in v1.1.0
Tofu displays the TOFU warning modal. It returns a bool indicating whether the user wants to continue.
Types ¶
This section is empty.