From 6b8faf0ecfaaa375fa84e2e6b3a10ecff6d9cda1 Mon Sep 17 00:00:00 2001 From: Xavier Michelon Date: Wed, 30 Nov 2022 09:46:07 +0100 Subject: [PATCH] GODT-2167: bind sign-in buttons availability to loading state. --- .../frontend/bridge-gui/bridge-gui/qml/SignIn.qml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/internal/frontend/bridge-gui/bridge-gui/qml/SignIn.qml b/internal/frontend/bridge-gui/bridge-gui/qml/SignIn.qml index 5f2a4a92..b164bb26 100644 --- a/internal/frontend/bridge-gui/bridge-gui/qml/SignIn.qml +++ b/internal/frontend/bridge-gui/bridge-gui/qml/SignIn.qml @@ -260,7 +260,7 @@ FocusScope { colorScheme: root.colorScheme id: signInButton text: loading ? qsTr("Signing in") : qsTr("Sign in") - + enabled: !loading Layout.fillWidth: true Layout.topMargin: 24 @@ -278,7 +278,6 @@ FocusScope { usernameTextField.enabled = false passwordTextField.enabled = false - enabled = false loading = true Backend.login(usernameTextField.text, Qt.btoa(passwordTextField.text)) @@ -357,7 +356,7 @@ FocusScope { colorScheme: root.colorScheme id: twoFAButton text: loading ? qsTr("Authenticating") : qsTr("Authenticate") - + enabled: !loading Layout.fillWidth: true Layout.topMargin: 24 @@ -369,10 +368,7 @@ FocusScope { } twoFactorPasswordTextField.enabled = false - - enabled = false loading = true - Backend.login2FA(usernameTextField.text, Qt.btoa(twoFactorPasswordTextField.text)) } } @@ -425,6 +421,7 @@ FocusScope { colorScheme: root.colorScheme id: secondPasswordButton text: loading ? qsTr("Unlocking") : qsTr("Unlock") + enabled: !loading Layout.fillWidth: true Layout.topMargin: 24 @@ -437,10 +434,7 @@ FocusScope { } secondPasswordTextField.enabled = false - - enabled = false loading = true - Backend.login2Password(usernameTextField.text, Qt.btoa(secondPasswordTextField.text)) } }