Documentation ¶
Index ¶
- Variables
- func AddViews()
- func ButtonView() *tview.TextView
- func CloseStatusInput()
- func ConfirmInput(label string) bool
- func ErrorMessage(page string, err error, stopLoading ...struct{})
- func HasTab(tab string) bool
- func InfoMessage(text string, persist bool)
- func InitViewByName(name string)
- func JobMonitor()
- func LoginScreen()
- func MatchProvider(providerConfig, provider string) bool
- func NewForm() *tview.Form
- func Normalize(values ...float64) []float64
- func OpenStatusInput(label string) *tview.InputField
- func ReadableString(d time.Duration) string
- func RoundDown(value, roundTo float64) float64
- func SelectTab(tab string)
- func SetInput(label string, multichar ...struct{}) string
- func SetTabs(tabs string)
- func SetView(view View, noexit ...struct{})
- func SetViewHostname(userInfo string)
- func SetViewTitle(title string, appendToCurrent ...struct{})
- func SetupTabs(tabs string, alignTabView int, switchFunc func(reverse bool) bool, ...)
- func SetupUI()
- func ShowHelp()
- func ShowViews()
- func StartLoading(text string)
- func StopLoading(text ...string)
- func StopUI()
- func SuspendApp(t tcell.Screen)
- func SwitchTabView(reverse bool, view ...*tview.TextView) string
- func TabView() *tview.TextView
- func UpdateButtonView(buttons []Button, addCondition ...func(label string) bool)
- func ViewTitle() tview.Primitive
- type Button
- type ButtonDisplay
- type ConfigUI
- type DashboardUI
- type ExplorerUI
- type FormUI
- type FormWidget
- func GetFormCheckBox(label string, setData func(name string, data interface{}), ...) *FormWidget
- func GetFormInputField(label string, editable, password bool, ...) *FormWidget
- func GetFormList(label string, optionData map[string]string, editable, exclusive bool, ...) *FormWidget
- func NewFormWidget(label string, primitive tview.FormItem, passwordButton ...*tview.Button) *FormWidget
- func (f *FormWidget) DisableMarker() *FormWidget
- func (f *FormWidget) EnableMarker() *FormWidget
- func (f *FormWidget) GetFieldHeight() int
- func (f *FormWidget) GetFieldWidth() int
- func (f *FormWidget) GetFormItem() tview.FormItem
- func (f *FormWidget) GetLabel() string
- func (f *FormWidget) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
- func (f *FormWidget) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
- func (f *FormWidget) SetRequired() *FormWidget
- type Help
- type JobUI
- type LoginUI
- type Modal
- type MountsUI
- type Pane
- type Status
- type TabDisplay
- type View
- type ViewBar
Constants ¶
This section is empty.
Variables ¶
var ( App *tview.Application MainPage *tview.Pages UIPages *tview.Pages )
Functions ¶
func ButtonView ¶
ButtonView returns a display area to show buttons.
func CloseStatusInput ¶
func CloseStatusInput()
CloseStatusInput closes the input field within the status bar.
func ConfirmInput ¶
ConfirmInput returns whether the user has pressed 'y' to confirm.
func ErrorMessage ¶
ErrorMessage sends an error message to the status bar.
func InfoMessage ¶
InfoMessage sends an info message to the status bar.
func InitViewByName ¶
func InitViewByName(name string)
InitViewByName searches for a view by name and sets it.
func LoginScreen ¶
func LoginScreen()
LoginScreen displays a login screen to enter authentication information.
func MatchProvider ¶
MatchProvider returns true if provider matches the providerConfig string. Taken from: https://github.com/rclone/rclone/blob/master/fs/backend_config.go#L542
func Normalize ¶
Normalize returns a set of numbers on the interval [0,1] for a given set of inputs. Adapted from: https://github.com/blend/go-sdk/blob/master/mathutil/normalize.go#L13
func OpenStatusInput ¶
func OpenStatusInput(label string) *tview.InputField
OpenStatusInput opens the input field within the status bar.
func ReadableString ¶
ReadableString parses d into a human-readable duration. Taken from: https://github.com/rclone/rclone/blob/master/fs/parseduration.go#L132
func RoundDown ¶
RoundDown rounds down to a given roundTo value. Taken from: https://github.com/blend/go-sdk/blob/master/mathutil/round.go#L18
func SetView ¶
func SetView(view View, noexit ...struct{})
SetView brings the provided view into focus.
func SetViewHostname ¶
func SetViewHostname(userInfo string)
SetViewHostname sets the user and host information within the title bar.
func SetViewTitle ¶
func SetViewTitle(title string, appendToCurrent ...struct{})
SetViewTitle sets the title for the current view.
func SetupTabs ¶
func SetupTabs(tabs string, alignTabView int, switchFunc func(reverse bool) bool, changedFunc func(tab string))
SetupTabs sets up the tabs within the display area.
func SwitchTabView ¶
SwitchTabView cycles through the tabs.
func UpdateButtonView ¶
UpdateButtonView updates the button display area. If addCondition is provided, each button label is checked against addCondition before displaying it.
Types ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
Button stores a button's label and the function to be executed when it is selected.
type ButtonDisplay ¶
ButtonDisplay stores the layout for the currently configured buttons.
type ConfigUI ¶
type ConfigUI struct { WizardUpdating bool // contains filtered or unexported fields }
ConfigUI stores a layout for the configuration page.
type DashboardUI ¶
type DashboardUI struct { Table *tview.Table Plot *tvxwidgets.Plot // contains filtered or unexported fields }
DashboardUI stores a layout to display dashboard information.
func (*DashboardUI) Focused ¶
func (d *DashboardUI) Focused() string
Focused returns the currently focused view.
func (*DashboardUI) Layout ¶
func (d *DashboardUI) Layout() tview.Primitive
Layout returns this page's layout.
type ExplorerUI ¶
ExplorerUI stores the layout for the explorer page.
func (*ExplorerUI) Focused ¶
func (e *ExplorerUI) Focused() string
Focused returns the currently focused view.
func (*ExplorerUI) Layout ¶
func (e *ExplorerUI) Layout() tview.Primitive
Layout returns this page's layout.
type FormUI ¶
type FormUI struct { ManagerTable *tview.Table ManagerPages *tview.Pages ManagerButtons []Button WizardPages *tview.Pages WizardButtons []Button WizardData map[string]interface{} WizardForms map[string]*tview.Form WizardHelp *tview.TextView Flex *tview.Flex // contains filtered or unexported fields }
FormUI stores the layout for a form page.
type FormWidget ¶
type FormWidget struct { tview.Primitive Item tview.FormItem Label string Marker *tview.TextView // contains filtered or unexported fields }
FormWidget stores the layout for a form item.
func GetFormCheckBox ¶
func GetFormCheckBox( label string, setData func(name string, data interface{}), doFunc func(label string), value ...string, ) *FormWidget
GetFormCheckBox returns a checkbox.
func GetFormInputField ¶
func GetFormInputField( label string, editable, password bool, setData func(name string, data interface{}), doFunc func(label string), value ...string, ) *FormWidget
GetFormInputField returns an input field.
func GetFormList ¶
func GetFormList( label string, optionData map[string]string, editable, exclusive bool, setData func(name string, data interface{}), doFunc func(label string), changedFunc func(option string), value ...string, ) *FormWidget
GetFormList returns a queryable list with options.
func NewFormWidget ¶
func NewFormWidget(label string, primitive tview.FormItem, passwordButton ...*tview.Button) *FormWidget
NewFormWidget returns a form item, which can be added to a form.
func (*FormWidget) DisableMarker ¶
func (f *FormWidget) DisableMarker() *FormWidget
DisableMarker disables the marker for the form item.
func (*FormWidget) EnableMarker ¶
func (f *FormWidget) EnableMarker() *FormWidget
EnableMarker enables the marker for the form item.
func (*FormWidget) GetFieldHeight ¶
func (f *FormWidget) GetFieldHeight() int
func (*FormWidget) GetFieldWidth ¶
func (f *FormWidget) GetFieldWidth() int
GetFieldWidth returns the field width of the form item.
func (*FormWidget) GetFormItem ¶
func (f *FormWidget) GetFormItem() tview.FormItem
GetFormItem returns the form item.
func (*FormWidget) GetLabel ¶
func (f *FormWidget) GetLabel() string
GetLabel returns the label for the form item.
func (*FormWidget) SetFinishedFunc ¶
func (f *FormWidget) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
SetFinishedFunc sets the handler for when the form item is not focused.
func (*FormWidget) SetFormAttributes ¶
func (f *FormWidget) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
SetFormAttributes sets the form attributes for the form item.
func (*FormWidget) SetRequired ¶
func (f *FormWidget) SetRequired() *FormWidget
SetRequired marks the form item as required to be filled.
type Help ¶ added in v0.0.3
type Help struct {
Operation, Keybinding string
}
Help provides documentation for a specific operation and keybinding.
type JobUI ¶
type JobUI struct { View *tview.TreeView Lock sync.Mutex // contains filtered or unexported fields }
JobUI stores a layout to display running job information.
type LoginUI ¶
type LoginUI struct {
// contains filtered or unexported fields
}
LoginUI stores the authentication parameters.
type Modal ¶
type Modal struct { Name string Flex *tview.Flex Table *tview.Table TextView *tview.TextView Input *tview.InputField // contains filtered or unexported fields }
Modal stores a layout to display a floating modal.
func GetList ¶
func GetList( name, title, label string, optionData map[string]string, exitFunc func(text string), changedFunc func(option string), ) *Modal
GetList returns a list.
func NewCustomModal ¶
NewCustomModal returns a modal which includes the given item.
type MountsUI ¶
type MountsUI struct {
// contains filtered or unexported fields
}
MountsUI stores a layout for the mounts page.
type Pane ¶
type Pane struct {
ID, FS, Path string
Title *tview.TextView
View *tview.Table
Flex *tview.Flex
Modal *Modal
Status *tview.Pages
Input *tview.InputField
AboutText *tview.TextView
SortListText *tview.TextView
SpinnerText *tview.TextView
Spinner *tvxwidgets.Spinner
SpinnerCancel chan struct{}
Lock *semaphore.Weighted
// contains filtered or unexported fields
}
Pane stores the layout for a single explorer pane.
func (*Pane) Filter ¶
func (p *Pane) Filter()
Filter filters the items within the current directory.
func (*Pane) Select ¶
Select selects multiple items within the current directory. The selected items can then be used within an operation, for example copying files.
func (*Pane) ShowRemotes ¶
func (p *Pane) ShowRemotes()
ShowRemotes displays a modal with a list of available remotes.
type Status ¶
type Status struct { Pages *tview.Pages Input *tview.InputField Message *tview.TextView LoadText *tview.TextView LoadSpinner *tvxwidgets.Spinner LoadStatus bool // contains filtered or unexported fields }
Status stores the layout for a status bar.
type TabDisplay ¶
TabDisplay stores a layout to display tabs.