Compare commits

...

9 Commits

Author SHA1 Message Date
schlagmichdoch
e0548102d3 increase version to v1.8.1 2023-09-19 18:05:54 +02:00
schlagmichdoch
d7626822fa Merge missing translations from branch 'translate' 2023-09-19 18:03:13 +02:00
schlagmichdoch
426b75f336 Add new translations to websocket fallback version 2023-09-19 18:02:13 +02:00
schlagmichdoch
f63aebbcb4 Translated using Weblate (German)
Currently translated at 100.0% (139 of 139 strings)

Translation: PairDrop/pairdrop-spa
Translate-URL: https://hosted.weblate.org/projects/pairdrop/pairdrop-spa/de/
2023-09-19 17:58:32 +02:00
schlagmichdoch
5e74f515a7 Translated using Weblate (English)
Currently translated at 100.0% (139 of 139 strings)

Translation: PairDrop/pairdrop-spa
Translate-URL: https://hosted.weblate.org/projects/pairdrop/pairdrop-spa/en/
2023-09-19 17:58:32 +02:00
schlagmichdoch
e807c3959a fix #157: catch EADDRINUSE to prevent endless restarts if the port is already in use 2023-09-19 17:53:21 +02:00
schlagmichdoch
d77ccdf233 fix TypeError 2023-09-19 17:50:16 +02:00
schlagmichdoch
d45c6b5bea increase margin for hr-note ("OR") on dialogs 2023-09-19 00:24:32 +02:00
schlagmichdoch
5625bf6f93 Add missing strings form public room dialog to translation files 2023-09-19 00:23:19 +02:00
16 changed files with 64 additions and 34 deletions

View File

@@ -36,7 +36,7 @@ If applicable, add screenshots to help explain your problem.
**Bug occurs on official PairDrop instance https://pairdrop.net/**
No | Yes
Version: v1.8.0
Version: v1.8.1
**Bug occurs on self-hosted PairDrop instance**
No | Yes
@@ -44,7 +44,7 @@ No | Yes
**Self-Hosted Setup**
Proxy: Nginx | Apache2
Deployment: docker run | docker-compose | npm run start:prod
Version: v1.8.0
Version: v1.8.1
**Additional context**
Add any other context about the problem here.

View File

@@ -124,6 +124,14 @@ if (process.argv.includes('--localhost-only')) {
server.listen(port);
}
server.on('error', (err) => {
if (err.code === 'EADDRINUSE') {
console.error(err);
console.info("Error EADDRINUSE received, exiting process without restarting process...");
process.exit(0)
}
});
class PairDropServer {
constructor() {
@@ -174,7 +182,7 @@ class PairDropServer {
this._onDisconnect(sender);
break;
case 'pong':
this._keepAliveTimers[sender.id].lastBeat = Date.now();
this._setKeepAliveTimerToNow(sender);
break;
case 'join-ip-room':
this._joinIpRoom(sender);
@@ -576,6 +584,12 @@ class PairDropServer {
clearTimeout(this._keepAliveTimers[peer.id].timer);
}
}
_setKeepAliveTimerToNow(peer) {
if (this._keepAliveTimers[peer.id]?.lastBeat) {
this._keepAliveTimers[peer.id].lastBeat = Date.now();
}
}
}

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "pairdrop",
"version": "1.8.0",
"version": "1.8.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pairdrop",
"version": "1.8.0",
"version": "1.8.1",
"license": "ISC",
"dependencies": {
"express": "^4.18.2",

View File

@@ -1,6 +1,6 @@
{
"name": "pairdrop",
"version": "1.8.0",
"version": "1.8.1",
"description": "",
"main": "index.js",
"scripts": {

View File

@@ -267,13 +267,13 @@
<input type="text" class="textarea center" aria-label="room-id-char-4" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder="" disabled>
<input type="text" class="textarea center" aria-label="room-id-char-5" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder="" disabled>
</div>
<p class="font-subheading center text-center">Enter room id from another device to join.</p>
<p class="font-subheading center text-center" data-i18n-key="dialogs.enter-room-id-from-another-device" data-i18n-attrs="text">Enter room id from another device to join room.</p>
</div>
</div>
<div class="center row-reverse button-row">
<button class="button" type="submit" disabled>Join</button>
<button class="button" type="button" close>Close</button>
<button class="button leave-room" type="button">Leave</button>
<button class="button" type="submit" data-i18n-key="dialogs.join" data-i18n-attrs="text" disabled>Join</button>
<button class="button" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close>Close</button>
<button class="button leave-room" type="button" data-i18n-key="dialogs.leave" data-i18n-attrs="text">Leave</button>
</div>
</x-paper>
</x-background>
@@ -431,7 +431,7 @@
</svg>
<div class="title-wrapper">
<h1>PairDrop</h1>
<div class="font-subheading">v1.8.0</div>
<div class="font-subheading">v1.8.1</div>
</div>
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text">The easiest way to transfer files across devices</div>
<div class="row">

View File

@@ -55,8 +55,11 @@
"system-language": "Systemsprache",
"language-selector-title": "Sprache auswählen",
"hr-or": "ODER",
"input-room-id-on-another-device": "Gib diese Raum ID auf einem anderen Gerät ein",
"unpair": "Entkoppeln"
"input-room-id-on-another-device": "Gib diese Raum-ID auf einem anderen Gerät ein",
"unpair": "Entkoppeln",
"leave": "Verlassen",
"join": "Betreten",
"enter-room-id-from-another-device": "Gib die Raum-ID von einem anderen Gerät hier ein."
},
"about": {
"tweet_title": "Über PairDrop twittern",
@@ -119,7 +122,7 @@
"ios-memory-limit": "Für Übertragungen an iOS Geräte beträgt die maximale Dateigröße 200 MB",
"public-room-left": "Öffentlichen Raum {{publicRoomId}} verlassen",
"copied-to-clipboard-error": "Konnte nicht kopieren. Kopiere manuell.",
"public-room-id-invalid": "Ungültige Raum ID",
"public-room-id-invalid": "Ungültige Raum-ID",
"online-requirement-pairing": "Du musst online sein, um Geräte zu koppeln.",
"online-requirement-public-room": "Du musst online sein, um öffentliche Räume erstellen zu können."
},

View File

@@ -47,7 +47,8 @@
"input-key-on-this-device": "Input this key on another device",
"scan-qr-code": "or scan the QR-code.",
"enter-key-from-another-device": "Enter key from another device here.",
"input-room-id-on-another-device": "Input this room id on another device",
"input-room-id-on-another-device": "Input this room ID on another device",
"enter-room-id-from-another-device": "Enter room ID from another device to join room.",
"hr-or": "OR",
"pair": "Pair",
"cancel": "Cancel",
@@ -58,6 +59,8 @@
"auto-accept": "auto-accept",
"auto-accept-instructions-2": "to automatically accept all files sent from that device.",
"close": "Close",
"join": "Join",
"leave": "Leave",
"would-like-to-share": "would like to share",
"accept": "Accept",
"decline": "Decline",
@@ -106,7 +109,7 @@
"pairing-key-invalid": "Invalid key",
"pairing-key-invalidated": "Key {{key}} invalidated.",
"pairing-cleared": "All Devices unpaired.",
"public-room-id-invalid": "Invalid room id",
"public-room-id-invalid": "Invalid room ID",
"public-room-left": "Left public room {{publicRoomId}}",
"copied-to-clipboard": "Copied to clipboard",
"copied-to-clipboard-error": "Copying not possible. Copy manually.",

View File

@@ -127,7 +127,8 @@ class Localization {
if (!useDefault) {
translation = this.getTranslation(key, attr, data, true);
console.warn(`Missing translation entry for your language ${Localization.locale.toUpperCase()}. Using ${Localization.defaultLocale.toUpperCase()} instead.`, key, attr);
console.warn("Help translating PairDrop: https://hosted.weblate.org/projects/pairdrop/pairdrop-spa/");
console.warn(`Translate this string here: https://hosted.weblate.org/browse/pairdrop/pairdrop-spa/${Localization.locale.toLowerCase()}/?q=${key}`)
console.log("Help translating PairDrop: https://hosted.weblate.org/engage/pairdrop/");
} else {
console.warn("Missing translation in default language:", key, attr);
}

View File

@@ -1,4 +1,4 @@
const cacheVersion = 'v1.8.0';
const cacheVersion = 'v1.8.1';
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
const urlsToCache = [
'index.html',

View File

@@ -770,12 +770,13 @@ x-dialog a {
color: var(--primary-color);
}
/* Pair Devices Dialog */
/* Pair Devices Dialog & Public Room Dialog */
.input-key-container {
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
}
.input-key-container > input {
@@ -836,7 +837,7 @@ x-dialog hr {
.hr-note {
margin-top: 10px;
margin-bottom: 10px;
margin-bottom: 20px;
}
.hr-note hr {

View File

@@ -272,13 +272,13 @@
<input type="text" class="textarea center" aria-label="room-id-char-4" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder="" disabled>
<input type="text" class="textarea center" aria-label="room-id-char-5" maxlength="1" autocorrect="off" autocomplete="off" autocapitalize="none" spellcheck="false" contenteditable placeholder="" disabled>
</div>
<p class="font-subheading center text-center">Enter room id from another device to join.</p>
<p class="font-subheading center text-center" data-i18n-key="dialogs.enter-room-id-from-another-device" data-i18n-attrs="text">Enter room id from another device to join room.</p>
</div>
</div>
<div class="center row-reverse button-row">
<button class="button" type="submit" disabled>Join</button>
<button class="button" type="button" close>Close</button>
<button class="button leave-room" type="button">Leave</button>
<button class="button" type="submit" data-i18n-key="dialogs.join" data-i18n-attrs="text" disabled>Join</button>
<button class="button" type="button" data-i18n-key="dialogs.close" data-i18n-attrs="text" close>Close</button>
<button class="button leave-room" type="button" data-i18n-key="dialogs.leave" data-i18n-attrs="text">Leave</button>
</div>
</x-paper>
</x-background>
@@ -436,7 +436,7 @@
</svg>
<div class="title-wrapper">
<h1>PairDrop</h1>
<div class="font-subheading">v1.8.0</div>
<div class="font-subheading">v1.8.1</div>
</div>
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text">The easiest way to transfer files across devices</div>
<div class="row">

View File

@@ -55,8 +55,11 @@
"system-language": "Systemsprache",
"language-selector-title": "Sprache auswählen",
"hr-or": "ODER",
"input-room-id-on-another-device": "Gib diese Raum ID auf einem anderen Gerät ein",
"unpair": "Entkoppeln"
"input-room-id-on-another-device": "Gib diese Raum-ID auf einem anderen Gerät ein",
"unpair": "Entkoppeln",
"leave": "Verlassen",
"join": "Betreten",
"enter-room-id-from-another-device": "Gib die Raum-ID von einem anderen Gerät hier ein."
},
"about": {
"tweet_title": "Über PairDrop twittern",
@@ -119,7 +122,7 @@
"ios-memory-limit": "Für Übertragungen an iOS Geräte beträgt die maximale Dateigröße 200 MB",
"public-room-left": "Öffentlichen Raum {{publicRoomId}} verlassen",
"copied-to-clipboard-error": "Konnte nicht kopieren. Kopiere manuell.",
"public-room-id-invalid": "Ungültige Raum ID",
"public-room-id-invalid": "Ungültige Raum-ID",
"online-requirement-pairing": "Du musst online sein, um Geräte zu koppeln.",
"online-requirement-public-room": "Du musst online sein, um öffentliche Räume erstellen zu können."
},

View File

@@ -47,7 +47,8 @@
"input-key-on-this-device": "Input this key on another device",
"scan-qr-code": "or scan the QR-code.",
"enter-key-from-another-device": "Enter key from another device here.",
"input-room-id-on-another-device": "Input this room id on another device",
"input-room-id-on-another-device": "Input this room ID on another device",
"enter-room-id-from-another-device": "Enter room ID from another device to join room.",
"hr-or": "OR",
"pair": "Pair",
"cancel": "Cancel",
@@ -58,6 +59,8 @@
"auto-accept": "auto-accept",
"auto-accept-instructions-2": "to automatically accept all files sent from that device.",
"close": "Close",
"join": "Join",
"leave": "Leave",
"would-like-to-share": "would like to share",
"accept": "Accept",
"decline": "Decline",
@@ -106,7 +109,7 @@
"pairing-key-invalid": "Invalid key",
"pairing-key-invalidated": "Key {{key}} invalidated.",
"pairing-cleared": "All Devices unpaired.",
"public-room-id-invalid": "Invalid room id",
"public-room-id-invalid": "Invalid room ID",
"public-room-left": "Left public room {{publicRoomId}}",
"copied-to-clipboard": "Copied to clipboard",
"copied-to-clipboard-error": "Copying not possible. Copy manually.",

View File

@@ -127,7 +127,8 @@ class Localization {
if (!useDefault) {
translation = this.getTranslation(key, attr, data, true);
console.warn(`Missing translation entry for your language ${Localization.locale.toUpperCase()}. Using ${Localization.defaultLocale.toUpperCase()} instead.`, key, attr);
console.warn("Help translating PairDrop: https://hosted.weblate.org/projects/pairdrop/pairdrop-spa/");
console.warn(`Translate this string here: https://hosted.weblate.org/browse/pairdrop/pairdrop-spa/${Localization.locale.toLowerCase()}/?q=${key}`)
console.log("Help translating PairDrop: https://hosted.weblate.org/engage/pairdrop/");
} else {
console.warn("Missing translation in default language:", key, attr);
}

View File

@@ -1,4 +1,4 @@
const cacheVersion = 'v1.8.0';
const cacheVersion = 'v1.8.1';
const cacheTitle = `pairdrop-included-ws-fallback-cache-${cacheVersion}`;
const urlsToCache = [
'index.html',

View File

@@ -800,12 +800,13 @@ x-dialog a {
color: var(--primary-color);
}
/* Pair Devices Dialog */
/* Pair Devices Dialog & Public Room Dialog */
.input-key-container {
width: 100%;
display: flex;
justify-content: center;
margin-top: 10px;
}
.input-key-container > input {
@@ -866,7 +867,7 @@ x-dialog hr {
.hr-note {
margin-top: 10px;
margin-bottom: 10px;
margin-bottom: 20px;
}
.hr-note hr {