Cap paired devices to 1

pull/624/head
sachaaaaa 6 years ago
parent 502d4715ba
commit a83f66f0da

@ -159,6 +159,7 @@
const pubKeys = await libloki.storage.getSecondaryDevicesFor(ourPubKey); const pubKeys = await libloki.storage.getSecondaryDevicesFor(ourPubKey);
this.$('#pairedPubKeys').empty(); this.$('#pairedPubKeys').empty();
if (pubKeys && pubKeys.length > 0) { if (pubKeys && pubKeys.length > 0) {
this.$('#startPairing').attr('disabled', true);
pubKeys.forEach(x => { pubKeys.forEach(x => {
const name = this.getPubkeyName(x); const name = this.getPubkeyName(x);
const li = $('<li>').html(name); const li = $('<li>').html(name);
@ -173,6 +174,7 @@
this.$('#pairedPubKeys').append(li); this.$('#pairedPubKeys').append(li);
}); });
} else { } else {
this.$('#startPairing').removeAttr('disabled');
this.$('#pairedPubKeys').append('<li>No paired devices</li>'); this.$('#pairedPubKeys').append('<li>No paired devices</li>');
} }
} else if (this.accepted) { } else if (this.accepted) {

Loading…
Cancel
Save