mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 16:56:16 -04:00
fix bugs
This commit is contained in:
parent
29735ff617
commit
6748cc0cb4
4 changed files with 6 additions and 19 deletions
|
@ -669,7 +669,6 @@ class PeersManager {
|
|||
}
|
||||
|
||||
_onPeers(msg) {
|
||||
console.debug(msg)
|
||||
msg.peers.forEach(peer => {
|
||||
if (this.peers[peer.id]) {
|
||||
if (this.peers[peer.id].roomType === msg.roomType) {
|
||||
|
|
|
@ -43,7 +43,7 @@ class PeersUI {
|
|||
}
|
||||
|
||||
_onPeerJoined(msg) {
|
||||
this._joinPeer(msg.peer, msg.roomType, msg.roomType);
|
||||
this._joinPeer(msg.peer, msg.roomType, msg.roomSecret);
|
||||
}
|
||||
|
||||
_joinPeer(peer, roomType, roomSecret) {
|
||||
|
@ -714,22 +714,13 @@ class PairDeviceDialog extends Dialog {
|
|||
}
|
||||
|
||||
_onKeyDown(e) {
|
||||
if (this.$el.attributes["show"]) {
|
||||
if (e.code === "Escape") {
|
||||
this.hide();
|
||||
this._pairDeviceCancel();
|
||||
}
|
||||
if (e.code === "keyO") {
|
||||
this._onRoomSecretDelete()
|
||||
}
|
||||
if (this.$el.attributes["show"] && e.code === "Escape") {
|
||||
// Timeout to prevent paste mode from getting cancelled simultaneously
|
||||
setTimeout(_ => this._pairDeviceCancel(), 50);
|
||||
}
|
||||
}
|
||||
|
||||
_onCharsKeyDown(e) {
|
||||
if (this.$el.attributes["show"] && e.code === "Escape") {
|
||||
this.hide();
|
||||
this._pairDeviceCancel();
|
||||
}
|
||||
let previousSibling = e.target.previousElementSibling;
|
||||
let nextSibling = e.target.nextElementSibling;
|
||||
if (e.key === "Backspace" && previousSibling && !e.target.value) {
|
||||
|
@ -922,7 +913,7 @@ class SendTextDialog extends Dialog {
|
|||
this.$text = this.$el.querySelector('#textInput');
|
||||
const button = this.$el.querySelector('form');
|
||||
button.addEventListener('submit', _ => this._send());
|
||||
Events.on("keydown", e => this._onKeyDown(e))
|
||||
Events.on("keydown", e => this._onKeyDown(e));
|
||||
}
|
||||
|
||||
async _onKeyDown(e) {
|
||||
|
|
|
@ -56,9 +56,6 @@ const zipper = (() => {
|
|||
throw new Error("Zip file closed");
|
||||
}
|
||||
},
|
||||
specifyOnProgress(onprogressCallback) {
|
||||
zipWriter.onprogress = onprogressCallback;
|
||||
},
|
||||
async getZipFile(filename = "archive.zip") {
|
||||
if (zipWriter) {
|
||||
const file = new File([await zipWriter.close()], filename, {type: "application/zip"});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue