Add the new base32 secret validator to the UI: attach it to the secret input field.

master
Johan Ouwerkerk 2019-09-29 12:57:07 +02:00
parent b791bbad45
commit 73acbb68ae
1 changed files with 4 additions and 0 deletions

View File

@ -20,6 +20,7 @@
*/ */
import Oath 1.0 import Oath 1.0
import Oath.Validators 1.0 as Validators
import QtQuick 2.1 import QtQuick 2.1
import QtQuick.Layouts 1.2 import QtQuick.Layouts 1.2
import QtQuick.Controls 2.0 as Controls import QtQuick.Controls 2.0 as Controls
@ -184,6 +185,9 @@ Kirigami.ApplicationWindow {
Controls.TextField { Controls.TextField {
id: accountSecret id: accountSecret
Kirigami.FormData.label: "Secret key:" Kirigami.FormData.label: "Secret key:"
validator: Validators.Base32SecretValidator {
id: secretValidator
}
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
} }
Controls.TextField { Controls.TextField {