added a possibility to refresh the list of yubikeys

This commit is contained in:
antelle 2020-05-31 14:23:37 +02:00
parent 776c75d823
commit fb6bcdf5c9
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
3 changed files with 7 additions and 0 deletions

View File

@ -533,6 +533,7 @@
"setFileDeviceSettings": "Settings",
"setFileYubiKey": "YubiKey",
"setFileDontUseYubiKey": "Don't use a YubiKey",
"setFileRefreshYubiKeyList": "Refresh the list",
"setFileYubiKeyHeader": "YubiKey",
"setFileYubiKeyBody": "Using a YubiKey as a part of master key is dangerous and you may lose access to your passwords if something goes wrong. Have you made a backup of your file before changing this setting?",

View File

@ -755,6 +755,11 @@ class SettingsFileView extends View {
changeYubiKey(e) {
let chalResp = null;
const value = e.target.value;
if (value === 'refresh') {
this.render();
this.refreshYubiKeys();
return;
}
if (value) {
const option = e.target.selectedOptions[0];
const vid = +option.dataset.vid;

View File

@ -97,6 +97,7 @@
{{yk.fullName}}, {{res 'yubiKeySlot'}} {{yk.slot}}
</option>
{{/each}}
<option value="refresh">{{res 'setFileRefreshYubiKeyList'}}</option>
</select>
</p>