Documentation
¶
Index ¶
- Variables
- func GracefulUIQuit()
- func HandleReceiveCommand(programOptions models.TranOptions, password string)
- func HandleSendCommand(programOptions models.TranOptions, fileNames []string)
- func NewReceiverUI() *tea.Program
- func NewSenderUI() *tea.Program
- func TopLevelFilesText(fileNames []string) string
- func ValidateTranxAddress() error
- type Bubble
- type ErrorMsg
- type FileInfoMsg
- type FinishedMsg
- type KeyMap
- type PasswordMsg
- type ProgressMsg
- type ReadyMsg
- type UIUpdate
Constants ¶
This section is empty.
Variables ¶
View Source
var CompressingSpinner = spinner.Globe
View Source
var Keys = KeyMap{ Quit: key.NewBinding( key.WithKeys("q", "ctrl+q"), ), Down: key.NewBinding( key.WithKeys("down"), ), Up: key.NewBinding( key.WithKeys("up"), ), Left: key.NewBinding( key.WithKeys("left"), ), Right: key.NewBinding( key.WithKeys("right"), ), Enter: key.NewBinding( key.WithKeys("enter"), ), Escape: key.NewBinding( key.WithKeys("esc"), ), View: key.NewBinding( key.WithKeys("V"), ), GotoBottom: key.NewBinding( key.WithKeys("G"), ), HomeShortcut: key.NewBinding( key.WithKeys("~"), ), RootShortcut: key.NewBinding( key.WithKeys("/"), ), ToggleHidden: key.NewBinding( key.WithKeys("."), ), ShowDirectoriesOnly: key.NewBinding( key.WithKeys("D"), ), ShowFilesOnly: key.NewBinding( key.WithKeys("F"), ), Edit: key.NewBinding( key.WithKeys("E"), ), Find: key.NewBinding( key.WithKeys("ctrl+f"), ), ToggleBox: key.NewBinding( key.WithKeys("tab"), ), Receive: key.NewBinding( key.WithKeys("ctrl+r"), ), Send: key.NewBinding( key.WithKeys("ctrl+s"), ), }
DefaultKeyMap returns a set of default keybindings.
View Source
var ReceivingSpinner = spinner.Spinner{ Frames: []string{" ", " «", " ««", "«««"}, FPS: time.Second / 2, }
View Source
var TransferSpinner = spinner.Spinner{ Frames: []string{"» ", "»» ", "»»»", " "}, FPS: time.Millisecond * 400, }
View Source
var WaitingSpinner = spinner.Dot
Functions ¶
func GracefulUIQuit ¶
func GracefulUIQuit()
func HandleReceiveCommand ¶
func HandleReceiveCommand(programOptions models.TranOptions, password string)
HandleReceiveCommand is the receive application.
func HandleSendCommand ¶
func HandleSendCommand(programOptions models.TranOptions, fileNames []string)
func NewReceiverUI ¶
func NewSenderUI ¶
func TopLevelFilesText ¶
func ValidateTranxAddress ¶
func ValidateTranxAddress() error
Types ¶
type Bubble ¶
type Bubble struct {
// contains filtered or unexported fields
}
Bubble represents the state of the UI.
type FileInfoMsg ¶
type FinishedMsg ¶
type KeyMap ¶
type KeyMap struct {
Quit key.Binding
Down key.Binding
Up key.Binding
Left key.Binding
Right key.Binding
View key.Binding
Receive key.Binding
GotoBottom key.Binding
HomeShortcut key.Binding
RootShortcut key.Binding
ToggleHidden key.Binding
ShowDirectoriesOnly key.Binding
ShowFilesOnly key.Binding
Enter key.Binding
Edit key.Binding
Find key.Binding
Send key.Binding
Command key.Binding
Escape key.Binding
ToggleBox key.Binding
}
type PasswordMsg ¶
type PasswordMsg struct {
Password string
}
type ProgressMsg ¶
type ProgressMsg struct {
Progress float32
}
Click to show internal directories.
Click to hide internal directories.