This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user