Merge pull request #643 from sachaaaaa/pairing_QR

Show pubkey QR code in primary pairing dialog
pull/654/head
sachaaaaa 6 years ago committed by GitHub
commit 79532d7590
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -263,6 +263,9 @@
<!-- Waiting for request -->
<div class="waitingForRequestView" style="display: none;">
<h4>{{ waitingForRequestTitle }}</h4>
<div class="qr-dialog">
<div id="qr"></div>
</div>
<div class='buttons'>
<button class="cancel">{{ cancelText }}</button>
</div>

@ -5,6 +5,7 @@
textsecure,
ConversationController,
$,
QRCode,
*/
// eslint-disable-next-line func-names
@ -21,6 +22,10 @@
this.reset();
this.render();
this.showView();
this.qr = new QRCode(this.$('#qr')[0], {
correctLevel: QRCode.CorrectLevel.L,
});
this.qr.makeCode(textsecure.storage.user.getNumber());
},
reset() {
this.pubKey = null;
@ -194,6 +199,7 @@
},
close() {
this.remove();
this.qr.clear();
if (this.pubKey && !this.accepted) {
this.trigger('devicePairingRequestRejected', this.pubKey);
}

Loading…
Cancel
Save