view

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Local = "local"
)

Variables

This section is empty.

Functions

func CreateFilter added in v0.4.0

func CreateFilter(minAge, maxAge, minSize, maxSize string) (*filter.Filter, error)

CreateFilter returns a filter with the given min/max age and size.

Types

type Status

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

func NewStatus

func NewStatus(app *tview.Application) *Status

NewStatus returns the status bar component. We display the current remote, path and selection and action in the status bar.

func (*Status) GetAction

func (s *Status) GetAction() string

GetAction returns the selected action.

func (*Status) GetSelectedPath

func (s *Status) GetSelectedPath() []string

GetSelectedPath returns the selected path.

func (*Status) GetSelectedRemote

func (s *Status) GetSelectedRemote() string

GetSelectedRemote returns the selected remote.

func (*Status) SetLocation

func (s *Status) SetLocation(currentRemote string, currentPath []string)

SetLocation is used to set the current location, which contains the remote and path.

func (*Status) SetSelect

func (s *Status) SetSelect(selectedRemote string, selectedPath []string, action string)

SetSelect sets the selected remote and path. In addition to the remote and path we also set the action, which is used to decide how to handle a process of actions (e.g copy -> paste).

type View

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

func NewView

func NewView(app *tview.Application, status *Status, remotes, localPath []string, remoteFilter *filter.Filter) *View

NewView returns a new view. To create a new view we have to pass the app so that we can stop the application in case of an error. It also requires the status compnent, the remotes and the current directory of the user.

func (*View) SetView

func (v *View) SetView(otherView *View)

SetView is used to pass the other created view to this view instance. This is required so that we can switch the focus between views with the "tab" key.

Jump to

Keyboard shortcuts

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