Fix #798: Migrate SkipSSLVerify setting to per-server
This commit is contained in:
@@ -17,15 +17,16 @@ import (
|
||||
type AddEditServerDialog struct {
|
||||
widget.BaseWidget
|
||||
|
||||
ServerType backend.ServerType
|
||||
Nickname string
|
||||
Host string
|
||||
AltHost string
|
||||
Username string
|
||||
Password string
|
||||
LegacyAuth bool
|
||||
OnSubmit func()
|
||||
OnCancel func()
|
||||
ServerType backend.ServerType
|
||||
Nickname string
|
||||
Host string
|
||||
AltHost string
|
||||
Username string
|
||||
Password string
|
||||
LegacyAuth bool
|
||||
SkipSSLVerify bool
|
||||
OnSubmit func()
|
||||
OnCancel func()
|
||||
|
||||
passField *widget.Entry
|
||||
submitBtn *widget.Button
|
||||
@@ -45,6 +46,7 @@ func NewAddEditServerDialog(title string, cancelable bool, prefillServer *backen
|
||||
a.AltHost = prefillServer.AltHostname
|
||||
a.Username = prefillServer.Username
|
||||
a.LegacyAuth = prefillServer.LegacyAuth
|
||||
a.SkipSSLVerify = prefillServer.SkipSSLVerify
|
||||
}
|
||||
|
||||
titleLabel := widget.NewLabel(title)
|
||||
@@ -58,6 +60,7 @@ func NewAddEditServerDialog(title string, cancelable bool, prefillServer *backen
|
||||
legacyAuthCheck.Hide()
|
||||
}
|
||||
})
|
||||
skipSSLCheck := widget.NewCheckWithData(lang.L("Skip SSL certificate verification"), binding.BindBool(&a.SkipSSLVerify))
|
||||
serverTypeChoice.Required = true
|
||||
serverTypeChoice.Horizontal = true
|
||||
selected := backend.ServerTypeSubsonic
|
||||
@@ -113,7 +116,7 @@ func NewAddEditServerDialog(title string, cancelable bool, prefillServer *backen
|
||||
widget.NewLabel(lang.L("Password")),
|
||||
a.passField,
|
||||
),
|
||||
container.NewHBox(layout.NewSpacer(), legacyAuthCheck),
|
||||
container.NewHBox(layout.NewSpacer(), legacyAuthCheck, skipSSLCheck),
|
||||
widget.NewSeparator(),
|
||||
bottomRow,
|
||||
)
|
||||
|
||||
@@ -617,7 +617,6 @@ func (s *SettingsDialog) createAppearanceTab(window fyne.Window) *container.TabI
|
||||
|
||||
func (s *SettingsDialog) createAdvancedTab() *container.TabItem {
|
||||
multi := widget.NewCheckWithData(lang.L("Allow multiple app instances"), binding.BindBool(&s.config.Application.AllowMultiInstance))
|
||||
sslSkip := widget.NewCheckWithData(lang.L("Skip SSL certificate verification"), binding.BindBool(&s.config.Application.SkipSSLVerify))
|
||||
update := widget.NewCheckWithData(lang.L("Automatically check for updates"), binding.BindBool(&s.config.Application.EnableAutoUpdateChecker))
|
||||
lrclib := widget.NewCheckWithData(lang.L("Enable LrcLib lyrics fetcher"), binding.BindBool(&s.config.Application.EnableLrcLib))
|
||||
|
||||
@@ -659,7 +658,6 @@ func (s *SettingsDialog) createAdvancedTab() *container.TabItem {
|
||||
|
||||
return container.NewTabItem(lang.L("Advanced"), container.NewVBox(
|
||||
multi,
|
||||
sslSkip,
|
||||
update,
|
||||
lrclib,
|
||||
osMediaAPIs,
|
||||
|
||||
Reference in New Issue
Block a user