wip
Some checks failed
CloudSave/pipeline/head There was a failure building this commit

This commit is contained in:
2025-09-12 01:39:47 +02:00
parent 5f7ca22b8f
commit 57fc77755e
5 changed files with 142 additions and 49 deletions

View File

@@ -17,7 +17,7 @@ type (
}
)
func Make(remoteHostname string, callback func(v bool), w fyne.Window) *CredentialDialog {
func Make(remoteHostname string, callback func(ok bool, username, password string), w fyne.Window) *CredentialDialog {
label := canvas.NewText("Connexion to "+remoteHostname, color.Black)
inputUsername := widget.NewEntry()
@@ -43,13 +43,11 @@ func Make(remoteHostname string, callback func(v bool), w fyne.Window) *Credenti
}
d := &CredentialDialog{
FormDialog: dialog.NewForm("Syncing", "Connexion", "Cancel", formItems, callback, w),
inputUsername: inputUsername,
inputPassword: inputPassword,
}
d.FormDialog = dialog.NewForm("Syncing", "Connexion", "Cancel", formItems, func(b bool) {
callback(b, d.inputUsername.Text, d.inputPassword.Text)
}, w)
return d
}
func (c *CredentialDialog) Credentials() (string, string) {
return c.inputUsername.Text, c.inputPassword.Text
}