Merge pull request #532 from sachaaaaa/reset_pairing_view

[multi-device] Reset pairing view after error
pull/541/head
sachaaaaa 6 years ago committed by GitHub
commit 52f103f3d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,12 +11,14 @@
templateName: 'device-pairing-dialog', templateName: 'device-pairing-dialog',
initialize() { initialize() {
this.pubKeyRequests = []; this.pubKeyRequests = [];
this.reset();
this.render();
this.showView();
},
reset() {
this.pubKey = null; this.pubKey = null;
this.accepted = false; this.accepted = false;
this.isListening = false; this.isListening = false;
this.view = '';
this.render();
this.showView();
}, },
events: { events: {
'click #startPairing': 'startReceivingRequests', 'click #startPairing': 'startReceivingRequests',
@ -47,7 +49,7 @@
}, },
stopReceivingRequests() { stopReceivingRequests() {
this.trigger('stopReceivingRequests'); this.trigger('stopReceivingRequests');
this.isListening = false; this.reset();
this.showView(); this.showView();
}, },
requestReceived(secondaryDevicePubKey) { requestReceived(secondaryDevicePubKey) {

Loading…
Cancel
Save