Merge branch 'main' into feature/shuffle
This commit is contained in:
@@ -27,11 +27,12 @@ func (m *Controller) PromptForFirstServer() {
|
||||
m.doModalClosed()
|
||||
})
|
||||
conn := backend.ServerConnection{
|
||||
ServerType: d.ServerType,
|
||||
Hostname: d.Host,
|
||||
AltHostname: d.AltHost,
|
||||
Username: d.Username,
|
||||
LegacyAuth: d.LegacyAuth,
|
||||
ServerType: d.ServerType,
|
||||
Hostname: d.Host,
|
||||
AltHostname: d.AltHost,
|
||||
Username: d.Username,
|
||||
LegacyAuth: d.LegacyAuth,
|
||||
SkipSSLVerify: d.SkipSSLVerify,
|
||||
}
|
||||
server := m.App.ServerManager.AddServer(d.Nickname, conn)
|
||||
if err := m.trySetPasswordAndConnectToServer(server, d.Password); err != nil {
|
||||
@@ -138,6 +139,7 @@ func (m *Controller) PromptForLoginAndConnect() {
|
||||
server.Nickname = editD.Nickname
|
||||
server.Username = editD.Username
|
||||
server.LegacyAuth = editD.LegacyAuth
|
||||
server.SkipSSLVerify = editD.SkipSSLVerify
|
||||
m.trySetPasswordAndConnectToServer(server, editD.Password)
|
||||
m.doModalClosed()
|
||||
}
|
||||
@@ -164,11 +166,12 @@ func (m *Controller) PromptForLoginAndConnect() {
|
||||
// connection is good
|
||||
newPop.Hide()
|
||||
conn := backend.ServerConnection{
|
||||
ServerType: newD.ServerType,
|
||||
Hostname: newD.Host,
|
||||
AltHostname: newD.AltHost,
|
||||
Username: newD.Username,
|
||||
LegacyAuth: newD.LegacyAuth,
|
||||
ServerType: newD.ServerType,
|
||||
Hostname: newD.Host,
|
||||
AltHostname: newD.AltHost,
|
||||
Username: newD.Username,
|
||||
LegacyAuth: newD.LegacyAuth,
|
||||
SkipSSLVerify: newD.SkipSSLVerify,
|
||||
}
|
||||
server := m.App.ServerManager.AddServer(newD.Nickname, conn)
|
||||
m.trySetPasswordAndConnectToServer(server, newD.Password)
|
||||
@@ -233,11 +236,12 @@ func (c *Controller) tryConnectToServer(ctx context.Context, server *backend.Ser
|
||||
func (c *Controller) testConnectionAndUpdateDialogText(dlg *dialogs.AddEditServerDialog) bool {
|
||||
fyne.Do(func() { dlg.SetInfoText(lang.L("Testing connection") + "...") })
|
||||
conn := backend.ServerConnection{
|
||||
ServerType: dlg.ServerType,
|
||||
Hostname: dlg.Host,
|
||||
AltHostname: dlg.AltHost,
|
||||
Username: dlg.Username,
|
||||
LegacyAuth: dlg.LegacyAuth,
|
||||
ServerType: dlg.ServerType,
|
||||
Hostname: dlg.Host,
|
||||
AltHostname: dlg.AltHost,
|
||||
Username: dlg.Username,
|
||||
LegacyAuth: dlg.LegacyAuth,
|
||||
SkipSSLVerify: dlg.SkipSSLVerify,
|
||||
}
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
|
||||
@@ -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