Don't display mode mismatch messages unless known to be accurate

This commit is contained in:
Emil Lundberg 2018-04-24 17:17:44 +02:00
parent 30eae108b7
commit 636813d56a
No known key found for this signature in database
GPG Key ID: 1342CC2B5CF84F44
2 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,9 @@ Label {
if (device.nDevices === 0) {
return qsTr("No YubiKey detected.")
} else if (device.nDevices === 1) {
if (settings.slotMode && !device.hasOTP) {
if (settings.slotMode && device.enabled && !device.hasOTP) {
return qsTr("Authenticator mode is set to YubiKey slots, but the OTP connection mode is not enabled.")
} else if (ccidMode && !device.hasCCID) {
} else if (ccidMode && device.enabled && device.hasCCID) {
return qsTr("Authenticator mode is set to CCID, but the CCID connection mode is not enabled.")
} else {
return qsTr("Connecting to YubiKey...")

View File

@ -15,7 +15,7 @@ Python {
property var connections: []
property var entries: null
property int nextRefresh: 0
property var enabled: []
property var enabled: null
property bool yubikeyModuleLoaded: false
property bool yubikeyReady: false
property bool yubikeyBusy: false