constants

package
v0.1.43 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrimaryBoxActive = iota
	SecondaryBoxActive
	ThirdBoxActive
)
View Source
const (
	StatusBarHeight      = 1
	BoxPadding           = 1
	EllipsisStyle        = "..."
	FileSizeLoadingStyle = "---"
)
View Source
const (
	PADDING         = 2
	MAX_WIDTH       = 80
	PRIMARY_COLOR   = "#1E90FF"
	SECONDARY_COLOR = "#1E6AFF"
	DARK_GRAY_COLOR = "#3c3836"
	START_PERIOD    = 1 * time.Millisecond
	SHUTDOWN_PERIOD = 1000 * time.Millisecond
)
View Source
const DEFAULT_ADDRESS = "167.71.65.96"
View Source
const DEFAULT_PORT = 80
View Source
const MAX_CHUNK_BYTES = 1e6
View Source
const MAX_SEND_CHUNKS = 2e8
View Source
const RECEIVER_CONNECT_TIMEOUT time.Duration = 5 * time.Minute
View Source
const RECEIVE_TEMP_FILE_NAME_PREFIX = "tran-receive-tmp"
View Source
const SEND_TEMP_FILE_NAME_PREFIX = "tran-send-tmp"

Variables

View Source
var BoldText = baseStyle.Copy().Bold(true).Render
View Source
var BoldTextStyle = lipgloss.NewStyle().Bold(true)
View Source
var Colors = map[string]lipgloss.Color{
	"black": "#000000",
}
View Source
var HelpContent = `# Help Guide` + "\n" +
	"* `tab`: Switch between boxes\n" +
	"* `up`: Move up\n" +
	"* `down`: Move down\n" +
	"* `left`: Go back a directory\n" +
	"* `right`: Read file or enter directory\n" +
	"* `V`: View directory\n" +
	"* `T`: Go to top\n" +
	"* `G`: Go to bottom\n" +
	"* `~`: Go to your home directory\n" +
	"* `/`: Go to root directory\n" +
	"* `.`: Toggle hidden files and directories\n" +
	"* `D`: Only show directories\n" +
	"* `F`: Only show files\n" +
	"* `E`: Edit file\n" +
	"* `" + CtrlKey() + "+s`: Send files/directories to remote\n" +
	"* `" + CtrlKey() + "+r`: Receive files/directories from remote\n" +
	"* `" + CtrlKey() + "+f`: Find files and directories by name\n" +
	"* `q`/`" + CtrlKey() + "+q`: Quit"
View Source
var HelpStyle = baseStyle.Copy().Foreground(lipgloss.Color(DARK_GRAY_COLOR)).Render
View Source
var InfoContent = `# Info` + "\n" +
	"* Address: **" + DEFAULT_ADDRESS + "**\n" +
	"* Port: **" + fmt.Sprintf("%d", DEFAULT_PORT) + "**\n" +
	"* OS: **" + runtime.GOOS + "**\n" +
	"* Arch: **" + runtime.GOARCH + "**\n" +
	"* Author: " + "[**@abdfnx**](https://github.com/abdfnx)"
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 QuitCommandsHelpText = HelpStyle(fmt.Sprintf("(press one of [%s] keys to quit from tran)", (strings.Join(QuitKeys, ", "))))
View Source
var QuitKeys = []string{"q", "esc"}

Functions

func AltKey

func AltKey() string

func Clone_check_ml added in v0.1.1

func Clone_check_ml() string

func Clone_check_w added in v0.1.1

func Clone_check_w() string

func Clone_ml added in v0.1.1

func Clone_ml() string

func Clone_w added in v0.1.1

func Clone_w() string

func CtrlKey

func CtrlKey() string

func Fetch_ml added in v0.1.1

func Fetch_ml() string

func Fetch_w added in v0.1.1

func Fetch_w() string

func Pull_ml added in v0.1.1

func Pull_ml() string

func Pull_w added in v0.1.1

func Pull_w() string

func Push_ml added in v0.1.1

func Push_ml() string

func Push_w added in v0.1.1

func Push_w() string

func Start_ml added in v0.1.1

func Start_ml() string

func Start_w added in v0.1.1

func Start_w() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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