Documentation ¶
Index ¶
Constants ¶
View Source
const ( PADDING = 2 MAX_WIDTH = 80 PRIMARY_COLOR = "#B8BABA" SECONDARY_COLOR = "#626262" ELEMENT_COLOR = "#EE9F40" SECONDARY_ELEMENT_COLOR = "#EE9F70" START_PERIOD = 1 * time.Millisecond SHUTDOWN_PERIOD = 500 * time.Millisecond )
Variables ¶
View Source
var BoldText = baseStyle.Copy().Bold(true).Render
View Source
var CompressingSpinner = spinner.Spinner{ Frames: []string{"┉┉┉", "┅┅┅", "┄┄┄", "┉ ┉", "┅ ┅", "┄ ┄", " ┉ ", " ┉ ", " ┅ ", " ┅ ", " ┄ "}, FPS: time.Second / 3, }
View Source
var HelpStyle = baseStyle.Copy().Foreground(lipgloss.Color(SECONDARY_COLOR)).Render
View Source
var InfoStyle = baseStyle.Copy().Foreground(lipgloss.Color(PRIMARY_COLOR)).Render
View Source
var ItalicText = baseStyle.Copy().Italic(true).Render
View Source
var PadText = strings.Repeat(" ", PADDING)
View Source
var Progressbar = progress.NewModel(progress.WithGradient(SECONDARY_ELEMENT_COLOR, ELEMENT_COLOR))
View Source
var QuitCommandsHelpText = HelpStyle(fmt.Sprintf("(any of [%s] to abort)", (strings.Join(QuitKeys, ", "))))
View Source
var QuitKeys = []string{"ctrl+c", "q", "esc"}
View Source
var ReceivingSpinner = spinner.Spinner{ Frames: []string{" ", " «", " ««", "«««"}, FPS: time.Second / 2, }
View Source
var TransferSpinner = spinner.Spinner{ Frames: []string{"» ", "»» ", "»»»", " "}, FPS: time.Millisecond * 400, }
Functions ¶
func ByteCountSI ¶
Credits to (legendary Mr. Nilsson): https://yourbasic.org/golang/formatting-byte-size-to-human-readable-format/
func TopLevelFilesText ¶
Types ¶
type ProgressMsg ¶
type ProgressMsg int
type TransferTypeMsg ¶
Click to show internal directories.
Click to hide internal directories.