mirror of
https://github.com/taigrr/crocgui
synced 2025-01-18 04:03:16 -08:00
additional settings
This commit is contained in:
parent
ae5dbd3d18
commit
ebfac6f2e2
4
main.go
4
main.go
@ -20,6 +20,10 @@ func main() {
|
||||
a.Preferences().StringWithFallback("relay-address", "croc.schollz.com:9009")
|
||||
a.Preferences().StringWithFallback("relay-password", "pass123")
|
||||
a.Preferences().StringWithFallback("relay-ports", "9009,9010,9011,9012,9013")
|
||||
a.Preferences().BoolWithFallback("disable-local", true)
|
||||
a.Preferences().BoolWithFallback("force-local", false)
|
||||
a.Preferences().BoolWithFallback("disable-multiplexing", false)
|
||||
a.Preferences().BoolWithFallback("disable-compression", false)
|
||||
|
||||
textlogores := fyne.NewStaticResource("text-logo", textlogobytes)
|
||||
textlogo := canvas.NewImageFromResource(textlogores)
|
||||
|
5
recv.go
5
recv.go
@ -41,7 +41,10 @@ func recvTabItem(a fyne.App) *container.TabItem {
|
||||
RelayPassword: a.Preferences().String("relay-password"),
|
||||
Stdout: false,
|
||||
NoPrompt: true,
|
||||
DisableLocal: true,
|
||||
DisableLocal: a.Preferences().Bool("disable-local"),
|
||||
NoMultiplexing: a.Preferences().Bool("disable-multiplexing"),
|
||||
OnlyLocal: a.Preferences().Bool("force-local"),
|
||||
NoCompress: a.Preferences().Bool("disable-compression"),
|
||||
})
|
||||
if err != nil {
|
||||
log.Println("Receive setup error:", err)
|
||||
|
5
send.go
5
send.go
@ -52,7 +52,10 @@ func sendTabItem(a fyne.App, w fyne.Window) *container.TabItem {
|
||||
RelayPassword: a.Preferences().String("relay-password"),
|
||||
Stdout: false,
|
||||
NoPrompt: true,
|
||||
DisableLocal: true,
|
||||
DisableLocal: a.Preferences().Bool("disable-local"),
|
||||
NoMultiplexing: a.Preferences().Bool("disable-multiplexing"),
|
||||
OnlyLocal: a.Preferences().Bool("force-local"),
|
||||
NoCompress: a.Preferences().Bool("disable-compression"),
|
||||
})
|
||||
var filename string
|
||||
if err != nil {
|
||||
|
19
settings.go
19
settings.go
@ -10,10 +10,23 @@ import (
|
||||
|
||||
func settingsTabItem(a fyne.App) *container.TabItem {
|
||||
return container.NewTabItemWithIcon("Settings", theme.SettingsIcon(), container.NewVBox(
|
||||
widget.NewLabelWithStyle("Relay", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
||||
widget.NewForm(
|
||||
widget.NewFormItem("Relay Address", widget.NewEntryWithData(binding.BindPreferenceString("relay-address", a.Preferences()))),
|
||||
widget.NewFormItem("Relay Password", widget.NewEntryWithData(binding.BindPreferenceString("relay-password", a.Preferences()))),
|
||||
widget.NewFormItem("Relay Ports", widget.NewEntryWithData(binding.BindPreferenceString("relay-ports", a.Preferences()))),
|
||||
widget.NewFormItem("Address", widget.NewEntryWithData(binding.BindPreferenceString("relay-address", a.Preferences()))),
|
||||
widget.NewFormItem("Ports", widget.NewEntryWithData(binding.BindPreferenceString("relay-ports", a.Preferences()))),
|
||||
widget.NewFormItem("Password", widget.NewEntryWithData(binding.BindPreferenceString("relay-password", a.Preferences()))),
|
||||
),
|
||||
widget.NewSeparator(),
|
||||
widget.NewLabelWithStyle("Network Local", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
||||
widget.NewForm(
|
||||
widget.NewFormItem("", widget.NewCheckWithData("Disable Local", binding.BindPreferenceBool("disable-local", a.Preferences()))),
|
||||
widget.NewFormItem("", widget.NewCheckWithData("Force Local Only", binding.BindPreferenceBool("force-local", a.Preferences()))),
|
||||
),
|
||||
widget.NewSeparator(),
|
||||
widget.NewLabelWithStyle("Transfer Options", fyne.TextAlignLeading, fyne.TextStyle{Bold: true}),
|
||||
widget.NewForm(
|
||||
widget.NewFormItem("", widget.NewCheckWithData("Disable Multiplexing", binding.BindPreferenceBool("disable-multiplexing", a.Preferences()))),
|
||||
widget.NewFormItem("", widget.NewCheckWithData("Disable Compression", binding.BindPreferenceBool("disable-compression", a.Preferences()))),
|
||||
),
|
||||
))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user