From a83f66f0da4e3079b3088201cb8d5b0e436c342d Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Mon, 18 Nov 2019 11:57:48 +1100 Subject: [PATCH] Cap paired devices to 1 --- js/views/device_pairing_dialog_view.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/views/device_pairing_dialog_view.js b/js/views/device_pairing_dialog_view.js index d32105ea8..e9a3294d0 100644 --- a/js/views/device_pairing_dialog_view.js +++ b/js/views/device_pairing_dialog_view.js @@ -159,6 +159,7 @@ const pubKeys = await libloki.storage.getSecondaryDevicesFor(ourPubKey); this.$('#pairedPubKeys').empty(); if (pubKeys && pubKeys.length > 0) { + this.$('#startPairing').attr('disabled', true); pubKeys.forEach(x => { const name = this.getPubkeyName(x); const li = $('
  • ').html(name); @@ -173,6 +174,7 @@ this.$('#pairedPubKeys').append(li); }); } else { + this.$('#startPairing').removeAttr('disabled'); this.$('#pairedPubKeys').append('
  • No paired devices
  • '); } } else if (this.accepted) {