mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
PublicRoomDialog and PairDeviceDialog method names renamed
This commit is contained in:
parent
10b658e2e9
commit
5f77c785f9
1 changed files with 11 additions and 6 deletions
|
@ -1349,7 +1349,14 @@ class PairDeviceDialog extends Dialog {
|
||||||
_onPairDeviceInitiated(msg) {
|
_onPairDeviceInitiated(msg) {
|
||||||
this.pairKey = msg.pairKey;
|
this.pairKey = msg.pairKey;
|
||||||
this.roomSecret = msg.roomSecret;
|
this.roomSecret = msg.roomSecret;
|
||||||
|
this._setKeyAndQRCode();
|
||||||
|
this.inputKeyContainer._enableChars();
|
||||||
|
this.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
_setKeyAndQRCode() {
|
||||||
this.$key.innerText = `${this.pairKey.substring(0,3)} ${this.pairKey.substring(3,6)}`
|
this.$key.innerText = `${this.pairKey.substring(0,3)} ${this.pairKey.substring(3,6)}`
|
||||||
|
|
||||||
// Display the QR code for the url
|
// Display the QR code for the url
|
||||||
const qr = new QRCode({
|
const qr = new QRCode({
|
||||||
content: this._getPairUrl(),
|
content: this._getPairUrl(),
|
||||||
|
@ -1362,8 +1369,6 @@ class PairDeviceDialog extends Dialog {
|
||||||
join: true
|
join: true
|
||||||
});
|
});
|
||||||
this.$qrCode.innerHTML = qr.svg();
|
this.$qrCode.innerHTML = qr.svg();
|
||||||
this.inputKeyContainer._enableChars();
|
|
||||||
this.show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_getPairUrl() {
|
_getPairUrl() {
|
||||||
|
@ -1723,14 +1728,14 @@ class PublicRoomDialog extends Dialog {
|
||||||
_onPublicRoomCreated(roomId) {
|
_onPublicRoomCreated(roomId) {
|
||||||
this.roomId = roomId;
|
this.roomId = roomId;
|
||||||
|
|
||||||
this.setIdAndQrCode();
|
this._setKeyAndQrCode();
|
||||||
|
|
||||||
this.show();
|
this.show();
|
||||||
|
|
||||||
sessionStorage.setItem('public_room_id', roomId);
|
sessionStorage.setItem('public_room_id', roomId);
|
||||||
}
|
}
|
||||||
|
|
||||||
setIdAndQrCode() {
|
_setKeyAndQrCode() {
|
||||||
if (!this.roomId) return;
|
if (!this.roomId) return;
|
||||||
|
|
||||||
this.$key.innerText = this.roomId.toUpperCase();
|
this.$key.innerText = this.roomId.toUpperCase();
|
||||||
|
@ -1784,7 +1789,7 @@ class PublicRoomDialog extends Dialog {
|
||||||
if (!roomId) return;
|
if (!roomId) return;
|
||||||
|
|
||||||
this.roomId = roomId;
|
this.roomId = roomId;
|
||||||
this.setIdAndQrCode();
|
this._setKeyAndQrCode();
|
||||||
|
|
||||||
this._joinPublicRoom(roomId, true);
|
this._joinPublicRoom(roomId, true);
|
||||||
}
|
}
|
||||||
|
@ -1836,7 +1841,7 @@ class PublicRoomDialog extends Dialog {
|
||||||
if (isJoinedRoomId) {
|
if (isJoinedRoomId) {
|
||||||
this.roomId = roomId;
|
this.roomId = roomId;
|
||||||
this.roomIdJoin = false;
|
this.roomIdJoin = false;
|
||||||
this.setIdAndQrCode();
|
this._setKeyAndQrCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue