Compare commits

...

5 Commits

Author SHA1 Message Date
schlagmichdoch
a3a8228327 increase version to v1.7.4 2023-05-26 20:37:38 +02:00
schlagmichdoch
520b772bc8 fix #112 and differentiate between textContent and innerText 2023-05-26 20:36:12 +02:00
schlagmichdoch
27bf0fa74f fix #113 2023-05-26 20:36:12 +02:00
schlagmichdoch
e9f3c39f38 Merge pull request #114 from fm-sys/patch-1
Add 'files-sent' event used by 'Snapdrop & PairDrop for Android' app to support vibrations
2023-05-26 20:35:54 +02:00
fm-sys
58b7f6bb7c Add 'files-sent' event 2023-05-26 09:52:17 +02:00
13 changed files with 23 additions and 16 deletions

4
package-lock.json generated
View File

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

View File

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

View File

@@ -278,7 +278,7 @@
</svg> </svg>
<div class="title-wrapper"> <div class="title-wrapper">
<h1>PairDrop</h1> <h1>PairDrop</h1>
<div class="font-subheading">v1.7.3</div> <div class="font-subheading">v1.7.4</div>
</div> </div>
<div class="font-subheading">The easiest way to transfer files across devices</div> <div class="font-subheading">The easiest way to transfer files across devices</div>
<div class="row"> <div class="row">

View File

@@ -529,7 +529,7 @@ class Peer {
this._abortTransfer(); this._abortTransfer();
} }
// include for compatibility with Snapdrop for Android app // include for compatibility with 'Snapdrop & PairDrop for Android' app
Events.fire('file-received', fileBlob); Events.fire('file-received', fileBlob);
this._filesReceived.push(fileBlob); this._filesReceived.push(fileBlob);
@@ -547,6 +547,7 @@ class Peer {
if (!this._filesQueue.length) { if (!this._filesQueue.length) {
this._busy = false; this._busy = false;
Events.fire('notify-user', 'File transfer completed.'); Events.fire('notify-user', 'File transfer completed.');
Events.fire('files-sent'); // used by 'Snapdrop & PairDrop for Android' app
} else { } else {
this._dequeueFile(); this._dequeueFile();
} }

View File

@@ -1419,7 +1419,7 @@ class ReceiveTextDialog extends Dialog {
} }
async _onCopy() { async _onCopy() {
await navigator.clipboard.writeText(this.$text.textContent); await navigator.clipboard.writeText(this.$text.innerText);
Events.fire('notify-user', 'Copied to clipboard'); Events.fire('notify-user', 'Copied to clipboard');
this.hide(); this.hide();
} }
@@ -1594,7 +1594,7 @@ class Toast extends Dialog {
_onNotify(message) { _onNotify(message) {
if (this.hideTimeout) clearTimeout(this.hideTimeout); if (this.hideTimeout) clearTimeout(this.hideTimeout);
this.$el.textContent = message; this.$el.innerText = message;
this.show(); this.show();
this.hideTimeout = setTimeout(_ => this.hide(), 5000); this.hideTimeout = setTimeout(_ => this.hide(), 5000);
} }

View File

@@ -5,7 +5,7 @@ if (!navigator.clipboard) {
// A <span> contains the text to copy // A <span> contains the text to copy
const span = document.createElement('span'); const span = document.createElement('span');
span.textContent = text; span.innerText = text;
span.style.whiteSpace = 'pre'; // Preserve consecutive spaces and newlines span.style.whiteSpace = 'pre'; // Preserve consecutive spaces and newlines
// Paint the span outside the viewport // Paint the span outside the viewport

View File

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

View File

@@ -1124,11 +1124,14 @@ button::-moz-focus-inner {
text-align: center; text-align: center;
} }
#about header {
z-index: 1;
}
#about .fade-in { #about .fade-in {
transition: opacity 300ms; transition: opacity 300ms;
will-change: opacity; will-change: opacity;
transition-delay: 300ms; transition-delay: 300ms;
z-index: 11;
pointer-events: all; pointer-events: all;
} }

View File

@@ -281,7 +281,7 @@
</svg> </svg>
<div class="title-wrapper"> <div class="title-wrapper">
<h1>PairDrop</h1> <h1>PairDrop</h1>
<div class="font-subheading">v1.7.3</div> <div class="font-subheading">v1.7.4</div>
</div> </div>
<div class="font-subheading">The easiest way to transfer files across devices</div> <div class="font-subheading">The easiest way to transfer files across devices</div>
<div class="row"> <div class="row">

View File

@@ -1420,7 +1420,7 @@ class ReceiveTextDialog extends Dialog {
} }
async _onCopy() { async _onCopy() {
await navigator.clipboard.writeText(this.$text.textContent); await navigator.clipboard.writeText(this.$text.innerText);
Events.fire('notify-user', 'Copied to clipboard'); Events.fire('notify-user', 'Copied to clipboard');
this.hide(); this.hide();
} }
@@ -1595,7 +1595,7 @@ class Toast extends Dialog {
_onNotify(message) { _onNotify(message) {
if (this.hideTimeout) clearTimeout(this.hideTimeout); if (this.hideTimeout) clearTimeout(this.hideTimeout);
this.$el.textContent = message; this.$el.innerText = message;
this.show(); this.show();
this.hideTimeout = setTimeout(_ => this.hide(), 5000); this.hideTimeout = setTimeout(_ => this.hide(), 5000);
} }

View File

@@ -5,7 +5,7 @@ if (!navigator.clipboard) {
// A <span> contains the text to copy // A <span> contains the text to copy
const span = document.createElement('span'); const span = document.createElement('span');
span.textContent = text; span.innerText = text;
span.style.whiteSpace = 'pre'; // Preserve consecutive spaces and newlines span.style.whiteSpace = 'pre'; // Preserve consecutive spaces and newlines
// Paint the span outside the viewport // Paint the span outside the viewport

View File

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

View File

@@ -1150,11 +1150,14 @@ button::-moz-focus-inner {
text-align: center; text-align: center;
} }
#about header {
z-index: 1;
}
#about .fade-in { #about .fade-in {
transition: opacity 300ms; transition: opacity 300ms;
will-change: opacity; will-change: opacity;
transition-delay: 300ms; transition-delay: 300ms;
z-index: 11;
pointer-events: all; pointer-events: all;
} }