This commit is contained in:
schlagmichdoch 2023-01-18 15:44:20 +01:00
parent 29735ff617
commit 6748cc0cb4
4 changed files with 6 additions and 19 deletions

View file

@ -20,7 +20,7 @@ It uses a P2P connection if WebRTC is supported by the browser. WebRTC needs a S
If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages. If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages.
### What about privacy? Will files be saved on third-party-servers? ### What about privacy? Will files be saved on third-party-servers?
None of your files are ever sent to any server. Files are sent only between peers. PairDrop doesn't even use a database. If you are curious have a look [at the Server](https://github.com/schlagmichdoch/pairdrop/blob/master/server/). None of your files are ever sent to any server. Files are sent only between peers. PairDrop doesn't even use a database. If you are curious have a look [at the Server](https://github.com/schlagmichdoch/pairdrop/blob/master/index.js).
WebRTC encrypts the files on transit. WebRTC encrypts the files on transit.
If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages. If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages.

View file

@ -669,7 +669,6 @@ class PeersManager {
} }
_onPeers(msg) { _onPeers(msg) {
console.debug(msg)
msg.peers.forEach(peer => { msg.peers.forEach(peer => {
if (this.peers[peer.id]) { if (this.peers[peer.id]) {
if (this.peers[peer.id].roomType === msg.roomType) { if (this.peers[peer.id].roomType === msg.roomType) {

View file

@ -43,7 +43,7 @@ class PeersUI {
} }
_onPeerJoined(msg) { _onPeerJoined(msg) {
this._joinPeer(msg.peer, msg.roomType, msg.roomType); this._joinPeer(msg.peer, msg.roomType, msg.roomSecret);
} }
_joinPeer(peer, roomType, roomSecret) { _joinPeer(peer, roomType, roomSecret) {
@ -714,22 +714,13 @@ class PairDeviceDialog extends Dialog {
} }
_onKeyDown(e) { _onKeyDown(e) {
if (this.$el.attributes["show"]) { if (this.$el.attributes["show"] && e.code === "Escape") {
if (e.code === "Escape") { // Timeout to prevent paste mode from getting cancelled simultaneously
this.hide(); setTimeout(_ => this._pairDeviceCancel(), 50);
this._pairDeviceCancel();
}
if (e.code === "keyO") {
this._onRoomSecretDelete()
}
} }
} }
_onCharsKeyDown(e) { _onCharsKeyDown(e) {
if (this.$el.attributes["show"] && e.code === "Escape") {
this.hide();
this._pairDeviceCancel();
}
let previousSibling = e.target.previousElementSibling; let previousSibling = e.target.previousElementSibling;
let nextSibling = e.target.nextElementSibling; let nextSibling = e.target.nextElementSibling;
if (e.key === "Backspace" && previousSibling && !e.target.value) { if (e.key === "Backspace" && previousSibling && !e.target.value) {
@ -922,7 +913,7 @@ class SendTextDialog extends Dialog {
this.$text = this.$el.querySelector('#textInput'); this.$text = this.$el.querySelector('#textInput');
const button = this.$el.querySelector('form'); const button = this.$el.querySelector('form');
button.addEventListener('submit', _ => this._send()); button.addEventListener('submit', _ => this._send());
Events.on("keydown", e => this._onKeyDown(e)) Events.on("keydown", e => this._onKeyDown(e));
} }
async _onKeyDown(e) { async _onKeyDown(e) {

View file

@ -56,9 +56,6 @@ const zipper = (() => {
throw new Error("Zip file closed"); throw new Error("Zip file closed");
} }
}, },
specifyOnProgress(onprogressCallback) {
zipWriter.onprogress = onprogressCallback;
},
async getZipFile(filename = "archive.zip") { async getZipFile(filename = "archive.zip") {
if (zipWriter) { if (zipWriter) {
const file = new File([await zipWriter.close()], filename, {type: "application/zip"}); const file = new File([await zipWriter.close()], filename, {type: "application/zip"});