mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-22 23:20:54 +08:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ccb2170287 | |||
| 3454eebf37 | |||
| b6203288bf | |||
| bea0fa5b9c | |||
| 48090ec41c | |||
| 229084fab3 | |||
| d58f380565 | |||
| 676c68b6e7 | |||
| dd0dc21db5 | |||
| 4e72339479 |
@@ -36,7 +36,7 @@ If applicable, add screenshots to help explain your problem.
|
|||||||
|
|
||||||
**Bug occurs on official PairDrop instance https://pairdrop.net/**
|
**Bug occurs on official PairDrop instance https://pairdrop.net/**
|
||||||
No | Yes
|
No | Yes
|
||||||
Version: v1.10.2
|
Version: v1.10.3
|
||||||
|
|
||||||
**Bug occurs on self-hosted PairDrop instance**
|
**Bug occurs on self-hosted PairDrop instance**
|
||||||
No | Yes
|
No | Yes
|
||||||
@@ -44,7 +44,7 @@ No | Yes
|
|||||||
**Self-Hosted Setup**
|
**Self-Hosted Setup**
|
||||||
Proxy: Nginx | Apache2
|
Proxy: Nginx | Apache2
|
||||||
Deployment: docker run | docker compose | npm run start:prod
|
Deployment: docker run | docker compose | npm run start:prod
|
||||||
Version: v1.10.2
|
Version: v1.10.3
|
||||||
|
|
||||||
**Additional context**
|
**Additional context**
|
||||||
Add any other context about the problem here.
|
Add any other context about the problem here.
|
||||||
|
|||||||
Generated
+9
-9
@@ -1,19 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "pairdrop",
|
"name": "pairdrop",
|
||||||
"version": "1.10.2",
|
"version": "1.10.3",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "pairdrop",
|
"name": "pairdrop",
|
||||||
"version": "1.10.2",
|
"version": "1.10.3",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"express-rate-limit": "^7.1.5",
|
"express-rate-limit": "^7.1.5",
|
||||||
"ua-parser-js": "^1.0.37",
|
"ua-parser-js": "^1.0.37",
|
||||||
"unique-names-generator": "^4.3.0",
|
"unique-names-generator": "^4.3.0",
|
||||||
"ws": "^8.15.0"
|
"ws": "^8.16.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=15"
|
"node": ">=15"
|
||||||
@@ -640,9 +640,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ws": {
|
"node_modules/ws": {
|
||||||
"version": "8.15.0",
|
"version": "8.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||||
"integrity": "sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==",
|
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
@@ -1102,9 +1102,9 @@
|
|||||||
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
|
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
|
||||||
},
|
},
|
||||||
"ws": {
|
"ws": {
|
||||||
"version": "8.15.0",
|
"version": "8.16.0",
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.15.0.tgz",
|
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||||
"integrity": "sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==",
|
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||||
"requires": {}
|
"requires": {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pairdrop",
|
"name": "pairdrop",
|
||||||
"version": "1.10.2",
|
"version": "1.10.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "server/index.js",
|
"main": "server/index.js",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"express-rate-limit": "^7.1.5",
|
"express-rate-limit": "^7.1.5",
|
||||||
"ua-parser-js": "^1.0.37",
|
"ua-parser-js": "^1.0.37",
|
||||||
"unique-names-generator": "^4.3.0",
|
"unique-names-generator": "^4.3.0",
|
||||||
"ws": "^8.15.0"
|
"ws": "^8.16.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=15"
|
"node": ">=15"
|
||||||
|
|||||||
+1
-1
@@ -582,7 +582,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
<div class="title-wrapper" dir="ltr">
|
<div class="title-wrapper" dir="ltr">
|
||||||
<h1>PairDrop</h1>
|
<h1>PairDrop</h1>
|
||||||
<div class="font-subheading">v1.10.2</div>
|
<div class="font-subheading">v1.10.3</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
|
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
+21
-6
@@ -1978,12 +1978,15 @@ class ReceiveTextDialog extends Dialog {
|
|||||||
this._receiveTextQueue = [];
|
this._receiveTextQueue = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectionEmpty() {
|
||||||
|
return !window.getSelection().toString()
|
||||||
|
}
|
||||||
|
|
||||||
async _onKeyDown(e) {
|
async _onKeyDown(e) {
|
||||||
if (!this.isShown()) return
|
if (!this.isShown()) return
|
||||||
|
|
||||||
if (e.code === "KeyC" && (e.ctrlKey || e.metaKey)) {
|
if (e.code === "KeyC" && (e.ctrlKey || e.metaKey) && this.selectionEmpty()) {
|
||||||
await this._onCopy()
|
await this._onCopy()
|
||||||
this.hide();
|
|
||||||
}
|
}
|
||||||
else if (e.code === "Escape") {
|
else if (e.code === "Escape") {
|
||||||
this.hide();
|
this.hide();
|
||||||
@@ -2014,9 +2017,18 @@ class ReceiveTextDialog extends Dialog {
|
|||||||
|
|
||||||
// Beautify text if text is short
|
// Beautify text if text is short
|
||||||
if (text.length < 2000) {
|
if (text.length < 2000) {
|
||||||
// replace urls with actual links
|
// replace URLs with actual links
|
||||||
this.$text.innerHTML = this.$text.innerHTML.replace(/((https?:\/\/|www)[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\-._~:\/?#\[\]@!$&'()*+,;=]+)/g, url => {
|
this.$text.innerHTML = this.$text.innerHTML
|
||||||
return `<a href="${url}" target="_blank">${url}</a>`;
|
.replace(/(^|(?<=(<br>|\s)))(https?:\/\/|www.)(([a-z]|[A-Z]|[0-9]|[\-_~:\/?#\[\]@!$&'()*+,;=%]){2,}\.)(([a-z]|[A-Z]|[0-9]|[\-_~:\/?#\[\]@!$&'()*+,;=%.]){2,})/g,
|
||||||
|
(url) => {
|
||||||
|
let link = url;
|
||||||
|
|
||||||
|
// prefix www.example.com with http protocol to prevent it from being a relative link
|
||||||
|
if (link.startsWith('www')) {
|
||||||
|
link = "http://" + link
|
||||||
|
}
|
||||||
|
|
||||||
|
return `<a href="${link}" target="_blank">${url}</a>`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2049,7 +2061,10 @@ class ReceiveTextDialog extends Dialog {
|
|||||||
|
|
||||||
hide() {
|
hide() {
|
||||||
super.hide();
|
super.hide();
|
||||||
setTimeout(() => this._dequeueRequests(), 500);
|
setTimeout(() => {
|
||||||
|
this._dequeueRequests();
|
||||||
|
this.$text.innerHTML = "";
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const cacheVersion = 'v1.10.2';
|
const cacheVersion = 'v1.10.3';
|
||||||
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
|
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
|
||||||
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
|
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
|
||||||
const relativePathsToCache = [
|
const relativePathsToCache = [
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
max-height: 350px;
|
max-height: 350px;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
word-wrap: anywhere;
|
word-wrap: anywhere;
|
||||||
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea:before {
|
.textarea:before {
|
||||||
@@ -335,6 +336,7 @@ x-dialog x-paper {
|
|||||||
display: flex;
|
display: flex;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
max-width: 450px;
|
max-width: 450px;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
@@ -382,10 +384,6 @@ x-dialog:not([show]) x-paper {
|
|||||||
transform: scale(0.1);
|
transform: scale(0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
x-dialog a {
|
|
||||||
color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Pair Devices Dialog & Public Room Dialog */
|
/* Pair Devices Dialog & Public Room Dialog */
|
||||||
|
|
||||||
.input-key-container {
|
.input-key-container {
|
||||||
@@ -784,7 +782,7 @@ x-dialog x-paper {
|
|||||||
background-color: var(--bg-color-secondary) !important;
|
background-color: var(--bg-color-secondary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea * {
|
.textarea *:not(a) {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
color: unset !important;
|
color: unset !important;
|
||||||
@@ -797,6 +795,10 @@ x-dialog x-paper {
|
|||||||
font-weight: unset !important;
|
font-weight: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
x-dialog a {
|
||||||
|
color: var(--primary-color);
|
||||||
|
}
|
||||||
|
|
||||||
/* Image/Video/Audio Preview */
|
/* Image/Video/Audio Preview */
|
||||||
.file-preview {
|
.file-preview {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
|
|||||||
Reference in New Issue
Block a user