diff --git a/web/js/agent.js b/web/js/agent.js index d3ceb11..2a207ca 100644 --- a/web/js/agent.js +++ b/web/js/agent.js @@ -50,7 +50,7 @@ class Agent{ $('.modal').modal({dismissible:false, onOpenStart: function () { that.currentDevice = data['device']; - this.passkey= data['passkey']; + that.passkey = data['passkey']; $('#modalPopupHeader')[0].innerHTML = "Pair to host?"; $('#modalPopupTextBefore')[0].innerHTML = "Confirm you see the same passkey on host:"; $('#modalPopupLargeText')[0].innerHTML = data['passkey']; @@ -84,4 +84,4 @@ class Agent{ }); } -} \ No newline at end of file +} diff --git a/web/js/main.js b/web/js/main.js index bed97dc..bce883a 100644 --- a/web/js/main.js +++ b/web/js/main.js @@ -139,7 +139,7 @@ class Main{ }, error: function (jqXHR, textStatus, errorThrown){ M.toast({html: "Failed to load connected devices list. "+errorThrown, classes:"red"}); - that.updateHIDDevices(); + setTimeout(that.updateHIDDevices, 1000); } }); } @@ -282,7 +282,7 @@ class Main{ }, error: function (jqXHR, textStatus, errorThrown){ M.toast({html: "Failed to load update bluetooth devices list. "+errorThrown, classes:"red"}); - that.updateListOfBluetoothDevices(); + setTimeout(that.updateListOfBluetoothDevices, 1000); } }); }