This commit is contained in:
antelle 2020-04-29 18:17:26 +02:00
parent 76fa1f6c9f
commit a8590c1b90
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
1 changed files with 5 additions and 1 deletions

View File

@ -982,7 +982,11 @@ class OpenView extends View {
usbDevicesChanged() {
if (this.model.settings.canOpenOtpDevice && this.model.settings.yubiKeyShowIcon) {
const hasYubiKeys = !!UsbListener.attachedYubiKeys.length;
this.$el.find('.open__icon-yubikey').toggleClass('hide', !hasYubiKeys);
const icon = this.$el.find('.open__icon-yubikey');
icon.toggleClass('hide', !hasYubiKeys);
if (!hasYubiKeys && this.busy && this.otpDevice) {
this.otpDevice.cancelOpen();
}
}
}