Show pubkey QR code in pairing dialog (as primary)

pull/643/head
sachaaaaa 6 years ago
parent e0dc04cba5
commit 94dd331cb1

@ -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,7 +5,8 @@
textsecure,
ConversationController,
$,
lokiFileServerAPI
lokiFileServerAPI,
QRCode,
*/
// eslint-disable-next-line func-names
@ -22,6 +23,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;
@ -198,6 +203,7 @@
},
close() {
this.remove();
this.qr.clear();
if (this.pubKey && !this.accepted) {
this.trigger('devicePairingRequestRejected', this.pubKey);
}

Loading…
Cancel
Save