Fix login with fields that were not taken account.

This commit is contained in:
Julien Wadel 2025-01-21 15:35:55 +01:00
parent 93bafc3700
commit e79af38bb2

View file

@ -324,6 +324,14 @@ LoginLayout {
domain.errorMessage = ""
errorText.clear()
loginDelay.restart()
}
onPressed: trigger()
KeyNavigation.up: transportCbox
Timer{
id: loginDelay
interval: 200
onTriggered: {
if (usernameEdit.text.length == 0 || passwordEdit.text.length == 0 || domainEdit.text.length == 0) {
if (usernameEdit.text.length == 0)
username.errorMessage = qsTr("Veuillez saisir un nom d'utilisateur")
@ -338,8 +346,7 @@ LoginLayout {
connectionButton.enabled = false
connectionButtonContent.currentIndex = 1
}
onPressed: trigger()
KeyNavigation.up: transportCbox
}
}
Item {
Layout.fillHeight: true