Error message when mode/connections mismatch

This commit is contained in:
Dag Heyman 2017-02-28 10:04:46 +01:00
parent 4d3384e7f5
commit 2e16fc20f9
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338
2 changed files with 14 additions and 0 deletions

View File

@ -227,22 +227,34 @@ ApplicationWindow {
} else {
qsTr("Multiple YubiKeys detected!")
}
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
Text {
visible: device.hasDevice
text: if (credentials !== null && filteredCredentials(credentials).length === 0) {
qsTr("No credentials found.")
} else if (settings.slotMode && !device.hasOTP) {
qsTr("Authenticator mode is set to YubiKey slots, but the OTP connection mode is not enabled.")
} else if (!settings.slotMode && !device.hasCCID) {
qsTr("Authenticator mode is set to CCID, but the CCID connection mode is not enabled.")
} else {
""
}
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
/*******
Clipboard

View File

@ -18,6 +18,8 @@ Python {
property var enabled: []
property bool ready: false
property var queue: []
property bool hasOTP: enabled.indexOf('OTP') !== -1
property bool hasCCID: enabled.indexOf('CCID') !== -1
property bool validated
property var passwordKey
signal wrongPassword