mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-06 09:53:49 +00:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6287c4cf0 | ||
|
|
c83e55b448 | ||
|
|
49160f9b02 | ||
|
|
7be2830a08 | ||
|
|
1f3dd080a0 | ||
|
|
5d709966af | ||
|
|
99b0c6ff01 | ||
|
|
76e08927de | ||
|
|
9118b0ae06 | ||
|
|
b36105b1cf | ||
|
|
ad4f727d19 | ||
|
|
3fa0873bc4 | ||
|
|
a03482bc7f | ||
|
|
40aa46fdd9 | ||
|
|
9003094e49 | ||
|
|
0459a361c3 | ||
|
|
10a669d7c6 | ||
|
|
3fbca72d74 | ||
|
|
f048c4f1bd | ||
|
|
6c1672ba25 | ||
|
|
caf19bdb45 | ||
|
|
5dcda58ce5 | ||
|
|
59360fb047 | ||
|
|
2e15a018da | ||
|
|
041261be2a | ||
|
|
f152645452 | ||
|
|
a7f5d336c3 | ||
|
|
c9e4510f65 | ||
|
|
70f74923e6 | ||
|
|
6217042f12 | ||
|
|
4659ef2041 | ||
|
|
a21881b7ca | ||
|
|
f589e9471e | ||
|
|
067117159a | ||
|
|
d901ca031a | ||
|
|
21fa6f07d8 | ||
|
|
f49b800f9e | ||
|
|
1a9fa8e60a | ||
|
|
79cc8e5590 | ||
|
|
89addd6649 | ||
|
|
ff883fb994 | ||
|
|
ccb2170287 | ||
|
|
3454eebf37 | ||
|
|
b6203288bf | ||
|
|
bea0fa5b9c | ||
|
|
48090ec41c | ||
|
|
229084fab3 | ||
|
|
d58f380565 | ||
|
|
676c68b6e7 | ||
|
|
dd0dc21db5 | ||
|
|
4e72339479 | ||
|
|
4a5a2ceb67 | ||
|
|
214d557feb |
4
.github/ISSUE_TEMPLATE/bug-report.md
vendored
4
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -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.10.2
|
||||
Version: v1.10.7
|
||||
|
||||
**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.10.2
|
||||
Version: v1.10.7
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
5
.github/workflows/zip-release.yml
vendored
5
.github/workflows/zip-release.yml
vendored
@@ -26,12 +26,11 @@ jobs:
|
||||
- name: Archive Release
|
||||
uses: thedoctor0/zip-release@b57d897cb5d60cb78b51a507f63fa184cfe35554 # v0.7.6
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'pairdrop-cli.zip'
|
||||
path: 'pairdrop-cli'
|
||||
directory: 'pairdrop-cli'
|
||||
exclusions: '*.git* /*node_modules/* .editorconfig'
|
||||
- name: Upload Release
|
||||
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5 # v1.13.0
|
||||
with:
|
||||
artifacts: "pairdrop-cli.zip"
|
||||
artifacts: "pairdrop-cli/pairdrop-cli.zip"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
178
README.md
178
README.md
@@ -3,133 +3,127 @@
|
||||
<img src="public/images/android-chrome-512x512.png" alt="Logo" width="150" height="150">
|
||||
</a>
|
||||
|
||||
<h1>PairDrop</h1>
|
||||
# _Send it_, with [PairDrop](https://pairdrop.net)
|
||||
|
||||
<p>
|
||||
Local file sharing in your browser. Inspired by Apple's AirDrop.
|
||||
<br />
|
||||
<a href="https://pairdrop.net"><strong>Explore »</strong></a>
|
||||
Local file sharing <a href="https://pairdrop.net"><strong>in your web browser</strong></a>.
|
||||
<br />
|
||||
<br />
|
||||
<a href="https://github.com/schlagmichdoch/PairDrop/issues">Report Bug</a>
|
||||
·
|
||||
<a href="https://github.com/schlagmichdoch/PairDrop/issues">Request Feature</a>
|
||||
<a href="https://github.com/schlagmichdoch/PairDrop/issues">Report a bug</a>
|
||||
<br />
|
||||
<a href="https://github.com/schlagmichdoch/PairDrop/issues">Request feature</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Features
|
||||
[PairDrop](https://pairdrop.net) is a sublime alternative to AirDrop that works on all platforms.
|
||||
File sharing on your local network that works on all platforms.
|
||||
|
||||
- File Sharing on your local network
|
||||
- Send images, documents or text via peer to peer connection to devices on the same local network.
|
||||
- Internet Transfers
|
||||
- Join temporary public rooms to transfer files easily over the internet!
|
||||
- Web-Application
|
||||
- As it is web based, it runs on all devices.
|
||||
- A multi-platform AirDrop-like solution that works.
|
||||
- Send images, documents or text via peer-to-peer connection to devices on the same local network.
|
||||
- Internet transfers
|
||||
- Join temporary public rooms to transfer files easily over the Internet.
|
||||
- Web-app
|
||||
- Works on all devices with a modern web-browser.
|
||||
|
||||
Send a file from your phone to your laptop?
|
||||
<br>Share photos in original quality with friends using Android and iOS?
|
||||
<br>Share private files peer-to-peer between Linux systems?
|
||||
|
||||
You want to quickly send a file from your phone to your laptop?
|
||||
<br>You want to share photos in original quality with friends that use a mixture of Android and iOS?
|
||||
<br>You want to share private files peer to peer between Linux systems?
|
||||
<br>AirDrop is unreliable again?
|
||||
<br>_Send it with PairDrop!_
|
||||
<img src="docs/pairdrop_screenshot_mobile.gif" alt="Screenshot GIF showing PairDrop in use" style="width: 300px">
|
||||
|
||||
Developed based on [Snapdrop](https://github.com/RobinLinus/snapdrop)
|
||||
## Differences to the [Snapdrop](https://github.com/RobinLinus/snapdrop) it is based on
|
||||
<details><summary>List view</summary>
|
||||
|
||||
## Differences to Snapdrop
|
||||
<details><summary>Click to expand</summary>
|
||||
|
||||
### Paired Devices and Public Rooms - Internet Transfer
|
||||
* Transfer files over the internet between paired devices or by entering temporary public rooms.
|
||||
* Connect to devices in complex network environments (public Wi-Fi, company network, Apple Private Relay, VPN etc.).
|
||||
### Paired Devices and Public Rooms — Internet Transfer
|
||||
* Transfer files over the Internet between paired devices or by entering temporary public rooms.
|
||||
* Connect to devices in complex network environments (public Wi-Fi, company network, iCloud Private Relay, VPN, etc.).
|
||||
* Connect to devices on your mobile hotspot.
|
||||
* Devices outside your local network that are behind a NAT are connected automatically via the PairDrop TURN server.
|
||||
* Devices outside of your local network that are behind a NAT are auto-connected via the PairDrop TURN server.
|
||||
* Connect to devices on your mobile hotspot.
|
||||
* You will always discover devices on your local network. Paired devices and devices in the same public room are shown additionally.
|
||||
* Devices from the local network, in the same public room, or previously paired are shown.
|
||||
|
||||
#### Persistent Device Pairing
|
||||
* Pair your devices via a 6-digit code or a QR-Code.
|
||||
* Paired devices will always find each other via shared secrets independently of their local network.
|
||||
* Paired devices are persistent. You find your devices even after reopening PairDrop.
|
||||
* You can edit and unpair devices easily
|
||||
* Ideal to always connect easily to your own devices
|
||||
|
||||
Always connect to known devices
|
||||
|
||||
* Pair devices via a 6-digit code or a QR-Code.
|
||||
* Paired devices always find each other via shared secrets independently of their local network.
|
||||
* Pairing is persistent. You find your devices even after reopening PairDrop.
|
||||
* You can edit and unpair devices easily.
|
||||
|
||||
#### Temporary Public Rooms
|
||||
* Enter a public room via a 5-letter code or a QR-Code.
|
||||
* Enter a public room to temporarily connect to devices outside your local network.
|
||||
* All devices in the same public room see each other mutually.
|
||||
* Public rooms are temporary. Public rooms are left as soon as PairDrop is closed.
|
||||
* Ideal to connect easily to others in complex network situations or over the internet.
|
||||
|
||||
### [Improved UI for sending/receiving files](https://github.com/RobinLinus/snapdrop/issues/560)
|
||||
* Files are transferred only after a request is accepted first. On transfer completion files are downloaded automatically if possible.
|
||||
Connect to others in complex network situations, or over the Internet.
|
||||
|
||||
* Enter a public room via a 5-letter code or a QR-code.
|
||||
* Enter a public room to temporarily connect to devices outside your local network.
|
||||
* All devices in the same public room see each other.
|
||||
* Public rooms are temporary. Closing PairDrop leaves all rooms.
|
||||
|
||||
### [Improved UI for Sending/Receiving Files](https://github.com/RobinLinus/snapdrop/issues/560)
|
||||
* Files are transferred after a request is accepted. Files are auto-downloaded upon completing a transfer, if possible.
|
||||
* Multiple files are downloaded as a ZIP file
|
||||
* On iOS and Android, in addition to downloading, files can be shared or saved to the gallery via the Share menu.
|
||||
* Multiple files are transferred at once with an overall progress indicator
|
||||
* Download, share or save to gallery via the "Share" menu on Android and iOS.
|
||||
* Multiple files are transferred at once with an overall progress indicator.
|
||||
|
||||
### Send Files or Text Directly From Share Menu, Context Menu or CLI
|
||||
* [Send files directly from context menu on Windows](docs/how-to.md#send-multiple-files-and-directories-directly-from-context-menu-on-windows)
|
||||
* [Send files directly from context menu on Ubuntu (using Nautilus)](/docs/how-to.md#send-multiple-files-and-directories-directly-from-context-menu-on-ubuntu-using-nautilus)
|
||||
* [Send files directly from share menu on iOS](docs/how-to.md#send-directly-from-share-menu-on-ios)
|
||||
* [Send files directly from share menu on Android](docs/how-to.md#send-directly-from-share-menu-on-android)
|
||||
* [Send files directly via command-line interface](docs/how-to.md#send-directly-via-command-line-interface)
|
||||
* [Send files directly from context menu on Ubuntu (using Nautilus)](docs/how-to.md#send-multiple-files-and-directories-directly-from-context-menu-on-ubuntu-using-nautilus)
|
||||
* [Send files directly from the context menu on Windows](docs/how-to.md#send-files-directly-from-context-menu-on-windows)
|
||||
* [Send directly from the "Share" menu on iOS](docs/how-to.md#send-directly-from-share-menu-on-ios)
|
||||
* [Send directly from the "Share" menu on Android](docs/how-to.md#send-directly-from-share-menu-on-android)
|
||||
* [Send directly via the command-line interface](docs/how-to.md#send-directly-via-command-line-interface)
|
||||
|
||||
### Other changes
|
||||
* Change your display name permanently to easily differentiate your devices
|
||||
* [Paste files/text and choose the recipient afterwords ](https://github.com/RobinLinus/snapdrop/pull/534)
|
||||
### Other Changes
|
||||
* Change your display name to easily differentiate your devices.
|
||||
* [Paste files/text and choose the recipient afterwards ](https://github.com/RobinLinus/snapdrop/pull/534)
|
||||
* [Prevent devices from sleeping on file transfer](https://github.com/RobinLinus/snapdrop/pull/413)
|
||||
* Warn user before PairDrop is closed on file transfer
|
||||
* Open PairDrop on multiple tabs simultaneously (Thanks [@willstott101](https://github.com/willstott101))
|
||||
* [Video and Audio preview](https://github.com/RobinLinus/snapdrop/pull/455) (Thanks [@victorwads](https://github.com/victorwads))
|
||||
* Switch theme back to auto/system after darkmode or lightmode is enabled
|
||||
* [Video and audio preview](https://github.com/RobinLinus/snapdrop/pull/455) (Thanks [@victorwads](https://github.com/victorwads))
|
||||
* Switch theme back to auto/system after dark or light mode is on
|
||||
* Node-only implementation (Thanks [@Bellisario](https://github.com/Bellisario))
|
||||
* Automatic restart on error (Thanks [@KaKi87](https://github.com/KaKi87))
|
||||
* Auto-restart on error (Thanks [@KaKi87](https://github.com/KaKi87))
|
||||
* Lots of stability fixes (Thanks [@MWY001](https://github.com/MWY001) [@skiby7](https://github.com/skiby7) and [@willstott101](https://github.com/willstott101))
|
||||
* To host PairDrop on your local network (e.g. on Raspberry Pi): [All peers connected with private IPs are discoverable by each other](https://github.com/RobinLinus/snapdrop/pull/558)
|
||||
* When hosting PairDrop yourself you can [set your own STUN/TURN servers](docs/host-your-own.md#specify-stunturn-servers)
|
||||
* Built-in translations via [Weblate](https://hosted.weblate.org/engage/pairdrop/)
|
||||
* Airy design (Thanks [@Avieshek](https://linktr.ee/avieshek/))
|
||||
* When hosting PairDrop yourself, you can [set your own STUN/TURN servers](docs/host-your-own.md#specify-stunturn-servers)
|
||||
* Translations.
|
||||
|
||||
</details>
|
||||
|
||||
## Screenshots
|
||||
<img src="docs/pairdrop_screenshot_mobile.gif" alt="Gif of Screenshots that show PairDrop in use" style="width: 300px">
|
||||
|
||||
## PairDrop is built with the following awesome technologies:
|
||||
* Vanilla HTML5 / ES6 / CSS3 frontend
|
||||
* [WebRTC](http://webrtc.org/) / [WebSockets](http://www.websocket.org/)
|
||||
* [NodeJS](https://nodejs.org/en/) backend
|
||||
* [Progressive Web App](https://wikipedia.org/wiki/Progressive_Web_App)
|
||||
* [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API)
|
||||
* [Weblate](https://weblate.org/) Web based localization tool
|
||||
* [zip.js](https://github.com/gildas-lormeau/zip.js) JavaScript library to zip and unzip files ([BSD 3-Clause License](licenses/BSD_3-Clause-zip-js))
|
||||
* [NoSleep](https://github.com/richtr/NoSleep.js) JavaScript library to prevent display sleep and enable wake lock in any Android or iOS web browser ([MIT License](licenses/MIT-NoSleep))
|
||||
* [heic2any](https://github.com/alexcorvi/heic2any) JavaScript library to convert HEIC/HEIF images to PNG/GIF/JPEG ([MIT License](licenses/MIT-heic2any))
|
||||
* [cyrb53](https://github.com/bryc) Super fast hash function
|
||||
|
||||
Have any questions? Read our [FAQ](docs/faq.md).
|
||||
|
||||
You can [host your own instance with Docker](docs/host-your-own.md).
|
||||
|
||||
|
||||
## Support PairDrop
|
||||
<a href="https://www.buymeacoffee.com/pairdrop" target="_blank">
|
||||
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" >
|
||||
</a>
|
||||
|
||||
PairDrop is free and always will be.
|
||||
Still, we have to pay for the domain and the server.
|
||||
|
||||
To contribute and support, please use BuyMeACoffee via the button above.
|
||||
|
||||
Thanks a lot for supporting free and open software!
|
||||
|
||||
## Translate PairDrop
|
||||
## Translate PairDrop on [Hosted Weblate](https://hosted.weblate.org/engage/pairdrop/)
|
||||
<a href="https://hosted.weblate.org/engage/pairdrop/">
|
||||
<img src="https://hosted.weblate.org/widget/pairdrop/pairdrop-spa/open-graph.png" alt="Translation status" style="width: 300px" />
|
||||
<img src="https://hosted.weblate.org/widget/pairdrop/horizontal-blue.svg" alt="Translation status" style="width: 300px" />
|
||||
</a>
|
||||
|
||||
## How to contribute
|
||||
## Built with the following awesome technologies:
|
||||
* Vanilla HTML5 / JS ES6 / CSS 3 frontend
|
||||
* [WebRTC](http://webrtc.org/) / WebSockets
|
||||
* [Node.js](https://nodejs.org/en/) backend
|
||||
* [Progressive web app (PWA)](https://en.wikipedia.org/wiki/Progressive_web_app) unified functionality
|
||||
* [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) storage handling
|
||||
* [zip.js](https://gildas-lormeau.github.io/zip.js/) library
|
||||
* [cyrb53](https://github.com/bryc/code/blob/master/jshash/experimental/cyrb53.js) super-fast hash function
|
||||
* [NoSleep](https://github.com/richtr/NoSleep.js) display sleep, add wake lock ([MIT](licenses/MIT-NoSleep))
|
||||
* [heic2any](https://github.com/alexcorvi/heic2any) HEIC/HEIF to PNG/GIF/JPEG ([MIT](licenses/MIT-heic2any))
|
||||
* [Weblate](https://weblate.org/) web-based localization tool
|
||||
|
||||
[FAQ](docs/faq.md)
|
||||
|
||||
[Host your own instance with Docker or Node.js](docs/host-your-own.md).
|
||||
|
||||
## Support
|
||||
<a href="https://www.buymeacoffee.com/pairdrop" target="_blank">
|
||||
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy me a coffee" style="height: 60px !important;width: 217px !important;" >
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
PairDrop is libre, and always will be. \
|
||||
I footed the bill for the domain and the server, and you can help create great softeare by supporting me. \
|
||||
Please use BuyMeACoffee via the button above. \
|
||||
Thanks a lot for supporting copylefted libre software!
|
||||
|
||||
## Contributing
|
||||
Feel free to [open an issue](https://github.com/schlagmichdoch/pairdrop/issues/new/choose) or a
|
||||
[pull request](https://github.com/schlagmichdoch/pairdrop/pulls) but follow
|
||||
[pull request](https://github.com/schlagmichdoch/pairdrop/pulls), following the
|
||||
[Contributing Guidelines](CONTRIBUTING.md).
|
||||
|
||||
@@ -24,7 +24,7 @@ This opens PairDrop in the default browser where you can choose the receiver.
|
||||
```bash
|
||||
pairdrop -h
|
||||
```
|
||||
```bash
|
||||
```
|
||||
Send files or text with PairDrop via command-line interface.
|
||||
Current domain: https://pairdrop-dev.onrender.com/
|
||||
|
||||
@@ -35,44 +35,61 @@ Send text: pairdrop -t "text"
|
||||
Specify domain: pairdrop -d "https://pairdrop.net/"
|
||||
Show this help text: pairdrop (-h|--help)
|
||||
|
||||
This pairdrop-cli version was released alongside v1.10.0
|
||||
This pairdrop-cli version was released alongside v1.10.4
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### Setup
|
||||
Download the bash file: [pairdrop-cli/pairdrop](/pairdrop-cli/pairdrop).
|
||||
|
||||
#### Linux
|
||||
#### Linux / Mac
|
||||
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
||||
2. Unzip the archive to a folder of your choice e.g. `/usr/local/bin/pairdrop-cli/`
|
||||
3. Make sure the bash file `/usr/local/bin/pairdrop-cli/pairdrop` is executable. Otherwise, use `chmod +x pairdrop`
|
||||
4. Add absolute path of the folder to PATH variable to make `pairdrop` available globally by executing
|
||||
`export PATH=$PATH:/usr/local/bin/pairdrop-cli/`
|
||||
|
||||
<br>
|
||||
|
||||
#### Mac
|
||||
1. add bash file to `/usr/local/bin`
|
||||
```shell
|
||||
wget "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.10.7/pairdrop-cli.zip"
|
||||
```
|
||||
or
|
||||
```shell
|
||||
curl -LO "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.10.7/pairdrop-cli.zip"
|
||||
```
|
||||
2. Unzip the archive to a folder of your choice e.g. `/usr/share/pairdrop-cli/`
|
||||
```shell
|
||||
sudo unzip pairdrop-cli.zip -d /usr/share/pairdrop-cli/
|
||||
```
|
||||
3. Copy the file _.pairdrop-cli-config.example_ to _.pairdrop-cli-config_
|
||||
```shell
|
||||
sudo cp /usr/share/pairdrop-cli/.pairdrop-cli-config.example /usr/share/pairdrop-cli/.pairdrop-cli-config
|
||||
```
|
||||
4. Make the bash file _pairdrop_ executable
|
||||
```shell
|
||||
sudo chmod +x /usr/share/pairdrop-cli/pairdrop
|
||||
```
|
||||
5. Add a symlink to /usr/local/bin/ to include _pairdrop_ to _PATH_
|
||||
```shell
|
||||
sudo ln -s /usr/share/pairdrop-cli/pairdrop /usr/local/bin/pairdrop
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
#### Windows
|
||||
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
||||
2. Put file in a preferred folder e.g. `C:\Program Files\pairdrop-cli`
|
||||
3. Search for and open `Edit environment variables for your account`
|
||||
4. Click `Environment Variables…`
|
||||
5. Under *System Variables* select `Path` and click *Edit...*
|
||||
6. Click *New*, insert the preferred folder (`C:\Program Files\pairdrop-cli`), click *OK* until all windows are closed
|
||||
7. Reopen Command prompt window
|
||||
3. Inside this folder, copy the file _.pairdrop-cli-config.example_ to _.pairdrop-cli-config_
|
||||
4. Search for and open `Edit environment variables for your account`
|
||||
5. Click `Environment Variables…`
|
||||
6. Under _System Variables_ select `Path` and click _Edit..._
|
||||
7. Click _New_, insert the preferred folder (`C:\Program Files\pairdrop-cli`), click *OK* until all windows are closed
|
||||
8. Reopen Command prompt window
|
||||
|
||||
<br>
|
||||
**Requirements**
|
||||
|
||||
### Requirements
|
||||
As Windows cannot execute bash scripts natively, you need to install [Git Bash](https://gitforwindows.org/).
|
||||
Then, you can also use pairdrop-cli from the default Windows Command Prompt \
|
||||
by using the shell file instead of the bash file: `pairdrop.sh -h` which then itself executes \
|
||||
pairdrop-cli (the bash file) via the Git Bash.
|
||||
|
||||
Then, you can also use pairdrop-cli from the default Windows Command Prompt
|
||||
by using the shell file instead of the bash file which then itself executes
|
||||
_pairdrop-cli_ (the bash file) via the Git Bash.
|
||||
```shell
|
||||
pairdrop.sh -h
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
@@ -82,14 +99,15 @@ pairdrop-cli (the bash file) via the Git Bash.
|
||||
It is possible to send multiple files with PairDrop via the context menu by adding pairdrop-cli to Windows `Send to` menu:
|
||||
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
||||
2. Unzip the archive to a folder of your choice e.g. `C:\Program Files\pairdrop-cli\`
|
||||
3. Copy the shortcut _send with PairDrop.lnk_
|
||||
4. Hit Windows Key+R, type: `shell:sendto` and hit Enter.
|
||||
5. Paste the copied shortcut into the directory
|
||||
6. Open the properties window of the shortcut and edit the link field to point to _send-with-pairdrop.ps1_ located in the folder you used in step 2: \
|
||||
3. Inside this folder, copy the file _.pairdrop-cli-config.example_ to _.pairdrop-cli-config_
|
||||
4. Copy the shortcut _send with PairDrop.lnk_
|
||||
5. Hit Windows Key+R, type: `shell:sendto` and hit Enter.
|
||||
6. Paste the copied shortcut into the directory
|
||||
7. Open the properties window of the shortcut and edit the link field to point to _send-with-pairdrop.ps1_ located in the folder you used in step 2: \
|
||||
`"C:\Program Files\PowerShell\7\pwsh.exe" -File "C:\Program Files\pairdrop-cli\send-with-pairdrop.ps1"`
|
||||
7. You are done! You can now send multiple files and directories directly via PairDrop:
|
||||
8. You are done! You can now send multiple files and directories directly via PairDrop:
|
||||
|
||||
> _context menu > Send to > PairDrop_
|
||||
_context menu_ > _Send to_ > _PairDrop_
|
||||
|
||||
##### Requirements
|
||||
As Windows cannot execute bash scripts natively, you need to install [Git Bash](https://gitforwindows.org/).
|
||||
@@ -100,14 +118,18 @@ As Windows cannot execute bash scripts natively, you need to install [Git Bash](
|
||||
|
||||
### Registering to open files with PairDrop
|
||||
It is possible to send multiple files with PairDrop via the context menu by adding pairdrop-cli to Nautilus `Scripts` menu:
|
||||
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
|
||||
2. Unzip the archive to a folder of your choice e.g. `/usr/local/bin/pairdrop-cli/`
|
||||
3. Copy the shell file _send-with-pairdrop.sh_ to `/home/<user>/.local/share/nautilus/scripts/`
|
||||
4. Edit the shell file and edit the variable `pathToPairDropCli` to point to the pairdrop-cli executable from step 2 (e.g. `/usr/local/bin/pairdrop-cli/pairdrop`)
|
||||
5. Make sure the shell file `/home/<user>/.local/share/nautilus/scripts/send-with-pairdrop.sh` is executable. Otherwise, use `chmod +x send-with-pairdrop.sh`
|
||||
6. You are done! You can now send multiple files and directories directly via PairDrop:
|
||||
1. Register _pairdrop_ as executable via [guide above](#linux).
|
||||
2. Copy the shell file _send-with-pairdrop_ to `~/.local/share/nautilus/scripts/` to include it in the context menu
|
||||
```shell
|
||||
cp /usr/share/pairdrop-cli/send-with-pairdrop ~/.local/share/nautilus/scripts/
|
||||
```
|
||||
3. Make the shell file _send-with-pairdrop_ executable
|
||||
```shell
|
||||
chmod +x ~/.local/share/nautilus/scripts/send-with-pairdrop
|
||||
```
|
||||
4. You are done! You can now send multiple files and directories directly via PairDrop:
|
||||
|
||||
> _context menu > Scripts > send-with-pairdrop.sh_
|
||||
_context menu_ > _Scripts_ > _send-with-pairdrop_
|
||||
|
||||
<br>
|
||||
|
||||
@@ -115,6 +137,6 @@ It is possible to send multiple files with PairDrop via the context menu by addi
|
||||
The [File Handling API](https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/how-to/handle-files)
|
||||
was implemented, but it was removed as default file associations were overwritten ([#17](https://github.com/schlagmichdoch/PairDrop/issues/17),
|
||||
[#116](https://github.com/schlagmichdoch/PairDrop/issues/116) [#190](https://github.com/schlagmichdoch/PairDrop/issues/190))
|
||||
and it only worked with explicitly specified file types and not with directories at all.
|
||||
and it only worked with explicitly specified file types and couldn't handle directories at all.
|
||||
|
||||
[< Back](/README.md)
|
||||
|
||||
18
package-lock.json
generated
18
package-lock.json
generated
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "pairdrop",
|
||||
"version": "1.10.2",
|
||||
"version": "1.10.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pairdrop",
|
||||
"version": "1.10.2",
|
||||
"version": "1.10.7",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2",
|
||||
"express-rate-limit": "^7.1.5",
|
||||
"ua-parser-js": "^1.0.37",
|
||||
"unique-names-generator": "^4.3.0",
|
||||
"ws": "^8.15.0"
|
||||
"ws": "^8.16.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=15"
|
||||
@@ -640,9 +640,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.15.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.15.0.tgz",
|
||||
"integrity": "sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==",
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
@@ -1102,9 +1102,9 @@
|
||||
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
|
||||
},
|
||||
"ws": {
|
||||
"version": "8.15.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.15.0.tgz",
|
||||
"integrity": "sha512-H/Z3H55mrcrgjFwI+5jKavgXvwQLtfPCUEp6pi35VhoB0pfcHnSoyuTzkBEZpzq49g1193CUEwIvmsjcotenYw==",
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"requires": {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pairdrop",
|
||||
"version": "1.10.2",
|
||||
"version": "1.10.7",
|
||||
"type": "module",
|
||||
"description": "",
|
||||
"main": "server/index.js",
|
||||
@@ -15,7 +15,7 @@
|
||||
"express-rate-limit": "^7.1.5",
|
||||
"ua-parser-js": "^1.0.37",
|
||||
"unique-names-generator": "^4.3.0",
|
||||
"ws": "^8.15.0"
|
||||
"ws": "^8.16.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=15"
|
||||
|
||||
1
pairdrop-cli/.pairdrop-cli-config.example
Normal file
1
pairdrop-cli/.pairdrop-cli-config.example
Normal file
@@ -0,0 +1 @@
|
||||
DOMAIN=https://pairdrop.net/
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# PairDrop version when this file was last changed
|
||||
version="v1.10.4"
|
||||
|
||||
############################################################
|
||||
# Help #
|
||||
############################################################
|
||||
@@ -17,7 +20,7 @@ help()
|
||||
echo -e "Specify domain:\t\t$(basename "$0") -d \"https://pairdrop.net/\""
|
||||
echo -e "Show this help text:\t$(basename "$0") (-h|--help)"
|
||||
echo
|
||||
echo "This pairdrop-cli version was released alongside v1.10.0"
|
||||
echo "This pairdrop-cli version was released alongside ${version}"
|
||||
}
|
||||
|
||||
openPairDrop()
|
||||
@@ -337,12 +340,15 @@ popd > '/dev/null';
|
||||
|
||||
config_path="${script_path}/.pairdrop-cli-config"
|
||||
|
||||
# If config file does not exist, try to create it. If it fails log error message and exit
|
||||
[ ! -f "$config_path" ] &&
|
||||
specifyDomain "https://pairdrop.net/" &&
|
||||
[ ! -f "$config_path" ] &&
|
||||
echo "Could not create config file. Add 'DOMAIN=https://pairdrop.net/' to a file called .pairdrop-cli-config in the same file as this 'pairdrop' bash file"
|
||||
echo "Could not create config file. Add 'DOMAIN=https://pairdrop.net/' to a file called .pairdrop-cli-config in the same file as this 'pairdrop' bash file (${script_path})" &&
|
||||
exit
|
||||
|
||||
[ ! -f "$config_path" ] || export "$(grep -v '^#' "$config_path" | xargs)"
|
||||
# Read config variables
|
||||
export "$(grep -v '^#' "$config_path" | xargs)"
|
||||
|
||||
setOs
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
# edit this to point to the pairdrop-cli executable
|
||||
pathToPairDropCli="/usr/local/bin/pairdrop-cli/pairdrop"
|
||||
|
||||
# Initialize an array
|
||||
lines=()
|
||||
|
||||
@@ -17,4 +14,4 @@ length=${#lines[@]}
|
||||
# Remove the last entry
|
||||
unset 'lines[length-1]'
|
||||
|
||||
$pathToPairDropCli "${lines[@]}"
|
||||
pairdrop "${lines[@]}"
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 12 KiB |
@@ -139,7 +139,7 @@
|
||||
<div class="edit-btn btn btn-small btn-rounded btn-dark text-white" data-i18n-key="header.edit-share-mode" data-i18n-attrs="text" hidden></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="websocket-fallback" hidden>
|
||||
<div id="websocket-fallback" class="text-center" hidden>
|
||||
<span data-i18n-key="footer.traffic" data-i18n-attrs="text"></span>
|
||||
<span data-i18n-key="footer.routed" data-i18n-attrs="text"></span>
|
||||
<span data-i18n-key="footer.webrtc" data-i18n-attrs="text"></span>
|
||||
@@ -582,7 +582,7 @@
|
||||
</svg>
|
||||
<div class="title-wrapper" dir="ltr">
|
||||
<h1>PairDrop</h1>
|
||||
<div class="font-subheading">v1.10.2</div>
|
||||
<div class="font-subheading">v1.10.7</div>
|
||||
</div>
|
||||
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
|
||||
<div class="row">
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
"language-selector_title": "إختر اللغة",
|
||||
"about_title": "حول PairDrop",
|
||||
"about_aria-label": "افتح حول PairDrop",
|
||||
"theme-light_title": "إستخدم دائماً المظهر الفاتح"
|
||||
"theme-light_title": "إستخدم دائماً المظهر الفاتح",
|
||||
"edit-share-mode": "ت٧ارف"
|
||||
},
|
||||
"instructions": {
|
||||
"x-instructions_mobile": "انقر لإرسال الملفات أو انقر لفترة طويلة لإرسال رسالة",
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
"x-instructions_desktop": "Klicke, um Dateien zu senden oder benutze einen Rechtsklick, um eine Nachricht zu senden",
|
||||
"no-peers-title": "Öffne PairDrop auf anderen Geräten, um Dateien zu senden",
|
||||
"no-peers_data-drop-bg": "Hier ablegen, um Empfänger auszuwählen",
|
||||
"no-peers-subtitle": "Kopple Geräte oder betrete einen öffentlichen Raum, um in anderen Netzwerken sichtbar zu sein",
|
||||
"no-peers-subtitle": "Kopple Geräte oder betritt einen öffentlichen Raum, um in anderen Netzwerken sichtbar zu sein",
|
||||
"x-instructions-share-mode_desktop": "Klicke zum Senden von {{descriptor}}",
|
||||
"x-instructions-share-mode_mobile": "Tippe zum Senden von {{descriptor}}",
|
||||
"x-instructions_data-drop-peer": "Hier ablegen, um an Peer zu senden",
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"room-url-copied-to-clipboard": "Tautan ke ruang publik disalin ke papan klip"
|
||||
},
|
||||
"header": {
|
||||
"cancel-share-mode": "Selesai",
|
||||
"cancel-share-mode": "Batalkan",
|
||||
"theme-auto_title": "Sesuaikan tema dengan sistem",
|
||||
"install_title": "Instal PairDrop",
|
||||
"theme-dark_title": "Selalu gunakan tema gelap",
|
||||
@@ -69,7 +69,9 @@
|
||||
"language-selector_title": "Atur Bahasa",
|
||||
"about_title": "Tentang PairDrop",
|
||||
"about_aria-label": "Buka Tentang PairDrop",
|
||||
"theme-light_title": "Selalu gunakan tema terang"
|
||||
"theme-light_title": "Selalu gunakan tema terang",
|
||||
"edit-share-mode": "Sunting",
|
||||
"expand_title": "Perluas baris tombol header"
|
||||
},
|
||||
"instructions": {
|
||||
"x-instructions_mobile": "Ketuk untuk mengirim file atau ketuk lama untuk mengirim pesan",
|
||||
@@ -83,7 +85,11 @@
|
||||
"no-peers-title": "Buka PairDrop di perangkat lain untuk berkirim file",
|
||||
"x-instructions_data-drop-peer": "Lepaskan untuk mengirim ke rekan",
|
||||
"x-instructions_data-drop-bg": "Lepaskan untuk memilih penerima",
|
||||
"no-peers_data-drop-bg": "Lepaskan untuk memilih penerima"
|
||||
"no-peers_data-drop-bg": "Lepaskan untuk memilih penerima",
|
||||
"activate-share-mode-and-other-file": "dan 1 file lainnya",
|
||||
"activate-share-mode-shared-file": "file yang dibagikan",
|
||||
"activate-share-mode-shared-files-plural": "{{count}} file yang dibagikan",
|
||||
"webrtc-requirement": "Untuk menggunakan instance PairDrop ini, WebRTC harus diaktifkan!"
|
||||
},
|
||||
"peer-ui": {
|
||||
"processing": "Memproses…",
|
||||
@@ -111,7 +117,7 @@
|
||||
"join": "Gabung",
|
||||
"title-image-plural": "Gambar",
|
||||
"send": "Kirim",
|
||||
"base64-tap-to-paste": "Ketuk di sini untuk menempelkan {{type}}",
|
||||
"base64-tap-to-paste": "Ketuk di sini untuk membagikan{{type}}",
|
||||
"base64-text": "teks",
|
||||
"copy": "Salin",
|
||||
"file-other-description-image": "dan 1 gambar lainnya",
|
||||
@@ -125,7 +131,7 @@
|
||||
"title-image": "Gambar",
|
||||
"file-other-description-file-plural": "dan {{count}} file lainnya",
|
||||
"would-like-to-share": "ingin berbagi",
|
||||
"send-message-to": "Kirim pesan ke",
|
||||
"send-message-to": "Ke:",
|
||||
"language-selector-title": "Pilih Bahasa",
|
||||
"pair": "Pasangkan",
|
||||
"hr-or": "ATAU",
|
||||
@@ -144,7 +150,11 @@
|
||||
"enter-room-id-from-another-device": "Masukkan room ID dari perangkat lain untuk bergabung dengan room.",
|
||||
"message_title": "Masukkan pesan untuk dikirim",
|
||||
"pair-devices-qr-code_title": "Klik untuk menyalin tautan untuk memasangkan perangkat ini",
|
||||
"public-room-qr-code_title": "Klik untuk menyalin tautan ke ruang publik"
|
||||
"public-room-qr-code_title": "Klik untuk menyalin tautan ke ruang publik",
|
||||
"base64-title-files": "Bagikan File",
|
||||
"base64-title-text": "Bagikan Teks",
|
||||
"message_placeholder": "Teks",
|
||||
"paired-device-removed": "Perangkat yang dipasangkan telah dihapus."
|
||||
},
|
||||
"about": {
|
||||
"claim": "Cara termudah untuk mentransfer file lintas perangkat",
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
"display-name_data-placeholder": "Caricamento…",
|
||||
"display-name_title": "Modifica il nome del tuo dispositivo permanentemente",
|
||||
"traffic": "Il traffico è",
|
||||
"paired-devices_title": "Puoi essere rilevato dai dispositivi abbinati in ogni momento, indipendentemente dalla rete.",
|
||||
"paired-devices_title": "Puoi essere rilevato dai dispositivi associati in ogni momento, indipendentemente dalla rete.",
|
||||
"public-room-devices": "nella stanza {{roomId}}",
|
||||
"paired-devices": "da dispositivi abbinati",
|
||||
"paired-devices": "da dispositivi associati",
|
||||
"on-this-network": "su questa rete",
|
||||
"routed": "instradato attraverso il server",
|
||||
"discovery": "Puoi essere rilevato:",
|
||||
@@ -15,7 +15,7 @@
|
||||
"known-as": "Sei visibile come:"
|
||||
},
|
||||
"header": {
|
||||
"cancel-share-mode": "Fatto",
|
||||
"cancel-share-mode": "Annulla",
|
||||
"theme-auto_title": "Adatta il tema al sistema automaticamente",
|
||||
"install_title": "Installa PairDrop",
|
||||
"theme-dark_title": "Usa sempre il tema scuro",
|
||||
@@ -26,13 +26,15 @@
|
||||
"language-selector_title": "Imposta Lingua",
|
||||
"about_title": "Informazioni su PairDrop",
|
||||
"about_aria-label": "Apri Informazioni su PairDrop",
|
||||
"theme-light_title": "Usa sempre il tema chiaro"
|
||||
"theme-light_title": "Usa sempre il tema chiaro",
|
||||
"edit-share-mode": "Modifica",
|
||||
"expand_title": "Espandi la riga dei pulsanti nell'intestazione"
|
||||
},
|
||||
"instructions": {
|
||||
"x-instructions_mobile": "Tocca per inviare file o tocco prolungato per inviare un messaggio",
|
||||
"x-instructions-share-mode_desktop": "Clicca per inviare",
|
||||
"x-instructions-share-mode_desktop": "Clicca per inviare {{descriptor}}",
|
||||
"activate-share-mode-and-other-files-plural": "e altri {{count}} files",
|
||||
"x-instructions-share-mode_mobile": "Tocca per inviare",
|
||||
"x-instructions-share-mode_mobile": "Tocca per inviare {{descriptor}}",
|
||||
"activate-share-mode-base": "Apri PairDrop su altri dispositivi per inviare",
|
||||
"no-peers-subtitle": "Abbina dispositivi o entra in una stanza pubblica per essere rilevabile su altre reti",
|
||||
"activate-share-mode-shared-text": "testo condiviso",
|
||||
@@ -40,23 +42,27 @@
|
||||
"no-peers-title": "Apri PairDrop su altri dispositivi per inviare files",
|
||||
"x-instructions_data-drop-peer": "Rilascia per inviare al peer",
|
||||
"x-instructions_data-drop-bg": "Rilascia per selezionare il destinatario",
|
||||
"no-peers_data-drop-bg": "Rilascia per selezionare il destinatario"
|
||||
"no-peers_data-drop-bg": "Rilascia per selezionare il destinatario",
|
||||
"webrtc-requirement": "Per usare questa istanza di PairDrop, devi attivare WebRTC!",
|
||||
"activate-share-mode-shared-file": "file condiviso",
|
||||
"activate-share-mode-shared-files-plural": "{{count}} files condivisi",
|
||||
"activate-share-mode-and-other-file": "ed 1 altro file"
|
||||
},
|
||||
"dialogs": {
|
||||
"auto-accept-instructions-2": "per accettare automaticamente tutti i files inviati da quel dispositivo.",
|
||||
"edit-paired-devices-title": "Modifica Dispositivi Abbinati",
|
||||
"edit-paired-devices-title": "Modifica Dispositivi Associati",
|
||||
"cancel": "Annulla",
|
||||
"auto-accept-instructions-1": "Attiva",
|
||||
"pair-devices-title": "Abbina Dispositivi Permanentemente",
|
||||
"pair-devices-title": "Associa Dispositivi Permanentemente",
|
||||
"temporary-public-room-title": "Stanza Pubblica Temporanea",
|
||||
"close": "Chiudi",
|
||||
"unpair": "Dissocia",
|
||||
"pair": "Abbina",
|
||||
"pair": "Associa",
|
||||
"scan-qr-code": "o scannerizza il codice QR.",
|
||||
"input-key-on-this-device": "Inserisci questo codice su un altro dispositivo",
|
||||
"paired-devices-wrapper_data-empty": "Nessun dispositivo abbinato.",
|
||||
"paired-devices-wrapper_data-empty": "Nessun dispositivo associato.",
|
||||
"enter-key-from-another-device": "Inserisci il codice dell'altro dispositivo qui.",
|
||||
"auto-accept": "accetta-automaticamente",
|
||||
"auto-accept": "accetta automaticamente",
|
||||
"input-room-id-on-another-device": "Inserisci l'ID di questa stanza su un altro dispositivo",
|
||||
"enter-room-id-from-another-device": "Inserisci l'ID stanza da un altro dispositivo per accedere alla stanza.",
|
||||
"base64-paste-to-send": "Incolla qui per inviare {{type}}",
|
||||
@@ -70,7 +76,7 @@
|
||||
"join": "Unisciti",
|
||||
"title-image-plural": "Immagini",
|
||||
"send": "Invia",
|
||||
"base64-tap-to-paste": "Tocca qui per incollare {{type}}",
|
||||
"base64-tap-to-paste": "Tocca qui per condividere {{type}}",
|
||||
"base64-text": "testo",
|
||||
"copy": "Copia",
|
||||
"file-other-description-image": "e 1 altra immagine",
|
||||
@@ -81,7 +87,7 @@
|
||||
"title-image": "Immagine",
|
||||
"file-other-description-file-plural": "e altri {{count}} files",
|
||||
"would-like-to-share": "vorrebbe condividere",
|
||||
"send-message-to": "Invia un messaggio a",
|
||||
"send-message-to": "A:",
|
||||
"language-selector-title": "Imposta Lingua",
|
||||
"hr-or": "OPPURE",
|
||||
"download-again": "Scarica ancora",
|
||||
@@ -91,11 +97,20 @@
|
||||
"send-message-title": "Invia Messaggio",
|
||||
"file-other-description-image-plural": "e {{count}} altre immagini",
|
||||
"message_title": "Inserire messaggio da inviare",
|
||||
"pair-devices-qr-code_title": "Clicca per copiare il link di abbinamento di questo dispositivo",
|
||||
"public-room-qr-code_title": "Clicca per copirare il link della stanza pubblica"
|
||||
"pair-devices-qr-code_title": "Clicca per copiare il link di associazione a questo dispositivo",
|
||||
"public-room-qr-code_title": "Clicca per copirare il link della stanza pubblica",
|
||||
"message_placeholder": "Testo",
|
||||
"paired-device-removed": "Il dispositivo associato è stato rimosso.",
|
||||
"base64-title-files": "Condividi Files",
|
||||
"base64-title-text": "Condividi Testo",
|
||||
"share-text-subtitle": "Modifica messaggio prima dell'invio:",
|
||||
"share-text-checkbox": "Mostra sempre questa casella di dialogo quando si condivide del testo",
|
||||
"approve": "accetta",
|
||||
"share-text-title": "Condividi Messaggio di Testo",
|
||||
"close-toast_title": "Chiudi notifica"
|
||||
},
|
||||
"notifications": {
|
||||
"request-title": "{{name}} vorrebbe trasferire {{count}} {{descriptor}}",
|
||||
"request-title": "{{name}} vorrebbe inviare {{count}} {{descriptor}}",
|
||||
"unfinished-transfers-warning": "Ci sono dei trasferimenti in corso. Sei sicuro di voler chiudere PairDrop?",
|
||||
"message-received": "Messaggio ricevuto da {{name}} - Clicca per copiare",
|
||||
"rate-limit-join-key": "Limite raggiunto. Aspetta 10 secondi e riprova.",
|
||||
@@ -103,22 +118,22 @@
|
||||
"pairing-key-invalidated": "Il codice {{key}} è stato invalidato",
|
||||
"pairing-key-invalid": "Codice non valido",
|
||||
"connected": "Connesso",
|
||||
"pairing-not-persistent": "I dispositivi abbinati non sono persistenti",
|
||||
"text-content-incorrect": "Il contenuto testuale non è corretto",
|
||||
"pairing-not-persistent": "I dispositivi associati non sono permanenti",
|
||||
"text-content-incorrect": "Il contenuto di testo è errato",
|
||||
"message-transfer-completed": "Trasferimento del messaggio completato",
|
||||
"file-transfer-completed": "Trasferimento file completato",
|
||||
"file-content-incorrect": "Il contenuto del file non è corretto",
|
||||
"files-incorrect": "I file non sono corretti",
|
||||
"selected-peer-left": "Peer selezionato ha abbandonato",
|
||||
"file-content-incorrect": "Il contenuto del file è errato",
|
||||
"files-incorrect": "I file sono errati",
|
||||
"selected-peer-left": "Il peer selezionato ha abbandonato",
|
||||
"link-received": "Link ricevuto da {{name}} - Clicca per aprire",
|
||||
"online": "Sei di nuovo online",
|
||||
"public-room-left": "Ha lasciato la stanza pubblica {{publicRoomId}}",
|
||||
"public-room-left": "Hai abbandonato la stanza pubblica {{publicRoomId}}",
|
||||
"copied-text": "Testo copiato negli appunti",
|
||||
"display-name-random-again": "Il nome visualizzato è generato casualmente un'altra volta",
|
||||
"display-name-changed-permanently": "Il nome visualizzato è cambiato permanentemente",
|
||||
"copied-to-clipboard-error": "La copia non è possibile. Copia manualmente.",
|
||||
"pairing-success": "Dispositivi abbinati",
|
||||
"clipboard-content-incorrect": "Il contenuto copiato non è corretto",
|
||||
"display-name-random-again": "Il nome visualizzato viene di nuovo generato casualmente",
|
||||
"display-name-changed-permanently": "Il nome visualizzato è cambiato definitivamente",
|
||||
"copied-to-clipboard-error": "La funzione di copia non è possibile. Copia manualmente.",
|
||||
"pairing-success": "Dispositivi associati",
|
||||
"clipboard-content-incorrect": "Il contenuto copiato è errato",
|
||||
"display-name-changed-temporarily": "Il nome visualizzato è cambiato solo per questa sessione",
|
||||
"copied-to-clipboard": "Copiato negli appunti",
|
||||
"offline": "Sei offline",
|
||||
@@ -127,14 +142,14 @@
|
||||
"click-to-download": "Clicca per scaricare",
|
||||
"pairing-cleared": "Tutti i dispositivi sono stati dissociati",
|
||||
"notifications-enabled": "Notifiche attivate",
|
||||
"online-requirement-pairing": "Devi essere online per abbinare dispositivi",
|
||||
"online-requirement-pairing": "Devi essere online per associare dispositivi",
|
||||
"ios-memory-limit": "L'invio di file a dispositivi iOS è possibile solo 200 MB alla volta",
|
||||
"online-requirement-public-room": "Devi essere online per creare una stanza pubblica",
|
||||
"copied-text-error": "Scrittura negli appunti fallita. Copia manualmente!",
|
||||
"download-successful": "{{descriptor}} scaricato",
|
||||
"click-to-show": "Clicca per mostrare",
|
||||
"notifications-permissions-error": "Il permesso all'invio delle notifiche è stato negato poiché l'utente ha ignorato varie volte le richieste di permesso. Ciò può essere ripristinato nelle \"informazioni sito\" cliccando sull'icona a forma di lucchetto vicino alla barra degli indirizzi.",
|
||||
"pair-url-copied-to-clipboard": "Link di abbinamento copiato negli appunti",
|
||||
"pair-url-copied-to-clipboard": "Link di associazione copiato negli appunti",
|
||||
"room-url-copied-to-clipboard": "Link della stanza copiato negli appunti"
|
||||
},
|
||||
"peer-ui": {
|
||||
@@ -150,14 +165,18 @@
|
||||
"claim": "Il modo più semplice per trasferire files tra dispositivi",
|
||||
"tweet_title": "Twitta riguardo PairDrop",
|
||||
"close-about_aria-label": "Chiudi Informazioni su PairDrop",
|
||||
"buy-me-a-coffee_title": "Comprami un caffè!",
|
||||
"buy-me-a-coffee_title": "Offrimi un caffè!",
|
||||
"github_title": "PairDrop su GitHub",
|
||||
"faq_title": "Domande Frequenti"
|
||||
"faq_title": "Domande Frequenti",
|
||||
"mastodon_title": "Scrivi su Mastodon di PairDrop",
|
||||
"bluesky_title": "Seguici su BlueSky",
|
||||
"custom_title": "Seguici",
|
||||
"privacypolicy_title": "Apri la nostra policy sulla privacy"
|
||||
},
|
||||
"document-titles": {
|
||||
"file-transfer-requested": "Trasferimento File Richiesto",
|
||||
"image-transfer-requested": "Trasferimento Immagine Richiesto",
|
||||
"message-received-plural": "{{count}} Messaggi ricevuti",
|
||||
"message-received-plural": "{{count}} Messaggi Ricevuti",
|
||||
"message-received": "Messaggio ricevuto",
|
||||
"file-received": "File Ricevuto",
|
||||
"file-received-plural": "{{count}} Files Ricevuti"
|
||||
|
||||
@@ -69,7 +69,9 @@
|
||||
"language-selector_title": "言語を設定",
|
||||
"about_title": "PairDropについて",
|
||||
"about_aria-label": "PairDropについてを開く",
|
||||
"theme-light_title": "常にライトテーマを使用する"
|
||||
"theme-light_title": "常にライトテーマを使用する",
|
||||
"edit-share-mode": "編集",
|
||||
"expand_title": "ヘッダーボタン列を拡大する"
|
||||
},
|
||||
"instructions": {
|
||||
"x-instructions_mobile": "タップしてファイルを送信または長押ししてメッセージを送信します",
|
||||
@@ -83,7 +85,11 @@
|
||||
"no-peers-title": "他のデバイスでPairDropを開いてファイルを送信します",
|
||||
"x-instructions_data-drop-peer": "離すとこの相手に送信します",
|
||||
"x-instructions_data-drop-bg": "送信したい相手の上で離してください",
|
||||
"no-peers_data-drop-bg": "送信したい相手の上で離してください"
|
||||
"no-peers_data-drop-bg": "送信したい相手の上で離してください",
|
||||
"activate-share-mode-and-other-file": "もう1つの別のファイル",
|
||||
"activate-share-mode-shared-file": "共有されたファイル",
|
||||
"activate-share-mode-shared-files-plural": "{{count}}個の共有されたファイル",
|
||||
"webrtc-requirement": "このPairDropインスタンスを使用するには、WebRTCを有効にする必要があります!"
|
||||
},
|
||||
"peer-ui": {
|
||||
"processing": "処理中…",
|
||||
@@ -144,7 +150,16 @@
|
||||
"enter-room-id-from-another-device": "他のデバイスに表示された参加したいルームのIDを入力します。",
|
||||
"message_title": "送信するメッセージを挿入",
|
||||
"pair-devices-qr-code_title": "クリックしてこのデバイスをペア設定するリンクをコピー",
|
||||
"public-room-qr-code_title": "クリックしてパブリックルームへのリンクをコピー"
|
||||
"public-room-qr-code_title": "クリックしてパブリックルームへのリンクをコピー",
|
||||
"paired-device-removed": "ペア設定されたデバイスが削除されました。",
|
||||
"message_placeholder": "テキスト",
|
||||
"base64-title-files": "共有されたファイル",
|
||||
"base64-title-text": "テキストを共有",
|
||||
"approve": "承諾",
|
||||
"share-text-subtitle": "送信する前にメッセージを編集する:",
|
||||
"share-text-checkbox": "テキストを共有するときに常にこのダイアログを表示する",
|
||||
"close-toast_title": "通知を閉じる",
|
||||
"share-text-title": "テキストメッセージを共有します"
|
||||
},
|
||||
"about": {
|
||||
"claim": "デバイス間でファイルを転送する最も簡単な方法",
|
||||
@@ -152,7 +167,11 @@
|
||||
"close-about_aria-label": "PairDropについてを閉じる",
|
||||
"buy-me-a-coffee_title": "コーヒーをおごってください!",
|
||||
"github_title": "GitHubでPairDropを見る",
|
||||
"faq_title": "FAQ"
|
||||
"faq_title": "FAQ",
|
||||
"mastodon_title": "MastodonにPairDropについて書く",
|
||||
"bluesky_title": "BlueSkyでフォロー",
|
||||
"custom_title": "フォロー",
|
||||
"privacypolicy_title": "プライバシーポリシーを開く"
|
||||
},
|
||||
"document-titles": {
|
||||
"file-transfer-requested": "ファイルの転送がリクエストされました",
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
"about_aria-label": "PairDrop ಕುರಿತು ಪುಟವನ್ನು ತೆರೆಯಿರಿ",
|
||||
"theme-light_title": "ಯಾವಾಗಲೂ ಲೈಟ್ ಥೀಮ್ ಅನ್ನು ಬಳಸಿ",
|
||||
"edit-share-mode": "ಎಡಿಟ್ ಮಾಡಿ",
|
||||
"cancel-share-mode": "ರದ್ದುಗೊಳಿಸಿ"
|
||||
"cancel-share-mode": "ರದ್ದುಗೊಳಿಸಿ",
|
||||
"expand_title": "ಹೆಡರ್ ಬಟನ್ ಸಾಲನ್ನು ವಿಸ್ತರಿಸಿ"
|
||||
},
|
||||
"dialogs": {
|
||||
"message_placeholder": "ಪಠ್ಯ",
|
||||
@@ -173,7 +174,11 @@
|
||||
"close-about_aria-label": "PairDrop ಕುರಿತು ಪುಟವನ್ನು ಮುಚ್ಚಿ",
|
||||
"buy-me-a-coffee_title": "ನನಗೆ ಕಾಫಿ ಖರೀದಿಸಿ!",
|
||||
"github_title": "GitHub ನಲ್ಲಿ PairDrop",
|
||||
"faq_title": "ಪದೇ ಪದೇ ಕೇಳಲಾಗುವ ಪ್ರಶ್ನೆಗಳು"
|
||||
"faq_title": "ಪದೇ ಪದೇ ಕೇಳಲಾಗುವ ಪ್ರಶ್ನೆಗಳು",
|
||||
"bluesky_title": "BlueSky ನಲ್ಲಿ ನಮ್ಮನ್ನು ಅನುಸರಿಸಿ",
|
||||
"privacypolicy_title": "ನಮ್ಮ ಗೌಪ್ಯತೆ ನೀತಿ ತೆರೆಯಿರಿ",
|
||||
"mastodon_title": "Mastodon ನಲ್ಲಿ PairDrop ಕುರಿತು ಬರೆಯಿರಿ",
|
||||
"custom_title": "ನಮ್ಮನ್ನು ಅನುಸರಿಸಿ"
|
||||
},
|
||||
"document-titles": {
|
||||
"file-transfer-requested": "ಫೈಲ್ ವರ್ಗಾವಣೆಗೆ ವಿನಂತಿಸಲಾಗಿದೆ",
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
"room-url-copied-to-clipboard": "Link către sala publică copiat în clipboard"
|
||||
},
|
||||
"header": {
|
||||
"cancel-share-mode": "Gata",
|
||||
"cancel-share-mode": "Anulare",
|
||||
"theme-auto_title": "Adaptează tema la sistem",
|
||||
"install_title": "Instalează PairDrop",
|
||||
"theme-dark_title": "Utilizați mereu tema întunecoasă",
|
||||
@@ -69,13 +69,15 @@
|
||||
"language-selector_title": "Setează Limba",
|
||||
"about_title": "Despre PairDrop",
|
||||
"about_aria-label": "Deschide Despre PairDrop",
|
||||
"theme-light_title": "Utilizați mereu tema luminoasă"
|
||||
"theme-light_title": "Utilizați mereu tema luminoasă",
|
||||
"expand_title": "Extindeți rândul de butoane antet",
|
||||
"edit-share-mode": "Editați"
|
||||
},
|
||||
"instructions": {
|
||||
"x-instructions_mobile": "Atingeți pentru a trimite fișiere sau atingeți lung pentru a trimite un mesaj",
|
||||
"x-instructions-share-mode_desktop": "Clic pentru a trimite",
|
||||
"x-instructions-share-mode_desktop": "Faceți clic pentru a trimite {{descriptor}}",
|
||||
"activate-share-mode-and-other-files-plural": "și {{count}} alte fișiere",
|
||||
"x-instructions-share-mode_mobile": "Atinge pentru a trimite",
|
||||
"x-instructions-share-mode_mobile": "Atingeți pentru a trimite {{descriptor}}",
|
||||
"activate-share-mode-base": "Deschideți PairDrop pe alte dispozitive pentru a trimite",
|
||||
"no-peers-subtitle": "Împerecheați dispozitive sau intrați într-o cameră publică pentru a fi descoperit în alte rețele",
|
||||
"activate-share-mode-shared-text": "text partajat",
|
||||
@@ -83,7 +85,11 @@
|
||||
"no-peers-title": "Deschideți PairDrop pe alte dispozitive pentru a trimite fișiere",
|
||||
"x-instructions_data-drop-peer": "Eliberare pentru a trimite la peer",
|
||||
"x-instructions_data-drop-bg": "Eliberați pentru a selecta recipientul",
|
||||
"no-peers_data-drop-bg": "Eliberare pentru a selecta recipientul"
|
||||
"no-peers_data-drop-bg": "Eliberați pentru a selecta destinatarul",
|
||||
"activate-share-mode-shared-files-plural": "{{count}} fișiere partajate",
|
||||
"activate-share-mode-shared-file": "fișier partajat",
|
||||
"activate-share-mode-and-other-file": "și încă 1 fișier",
|
||||
"webrtc-requirement": "Pentru a utiliza această instanță PairDrop, WebRTC trebuie să fie activat!"
|
||||
},
|
||||
"peer-ui": {
|
||||
"processing": "Procesarea…",
|
||||
@@ -95,7 +101,7 @@
|
||||
"transferring": "Transferul…"
|
||||
},
|
||||
"dialogs": {
|
||||
"base64-paste-to-send": "Lipiți aici pentru a trimite {{type}}",
|
||||
"base64-paste-to-send": "Inserați clipboard aici pentru a distribui {{type}}",
|
||||
"auto-accept-instructions-2": "pentru a accepta automat toate fișierele trimise de la dispozitivul respectiv.",
|
||||
"receive-text-title": "Mesaj primit",
|
||||
"edit-paired-devices-title": "Editați dispozitivele asociate",
|
||||
@@ -111,7 +117,7 @@
|
||||
"join": "Alătură-te",
|
||||
"title-image-plural": "Imagini",
|
||||
"send": "Trimite",
|
||||
"base64-tap-to-paste": "Atinge aici pentru a lipi {{type}}",
|
||||
"base64-tap-to-paste": "Atingeți aici pentru a distribui {{type}}",
|
||||
"base64-text": "text",
|
||||
"copy": "Copiază",
|
||||
"file-other-description-image": "și 1 altă imagine",
|
||||
@@ -125,7 +131,7 @@
|
||||
"title-image": "Imagine",
|
||||
"file-other-description-file-plural": "și {{count}} alte fișiere",
|
||||
"would-like-to-share": "ar dori să împărtășească",
|
||||
"send-message-to": "Trimite un mesaj la",
|
||||
"send-message-to": "La:",
|
||||
"language-selector-title": "Setați Limba",
|
||||
"pair": "Cuplu",
|
||||
"hr-or": "SAU",
|
||||
@@ -144,7 +150,16 @@
|
||||
"enter-room-id-from-another-device": "Introdu ID-ul camerei de pe un alt dispozitiv pentru a intra în cameră.",
|
||||
"message_title": "Inserați mesajul de trimis",
|
||||
"pair-devices-qr-code_title": "Dați clic pentru a copia link-ul pentru a asocia acest dispozitiv",
|
||||
"public-room-qr-code_title": "Dați clic pentru a copia link-ul în sala publică"
|
||||
"public-room-qr-code_title": "Dați clic pentru a copia link-ul în sala publică",
|
||||
"message_placeholder": "Text",
|
||||
"close-toast_title": "Închideți notificarea",
|
||||
"share-text-checkbox": "Afișați întotdeauna acest dialog atunci când partajați text",
|
||||
"base64-title-files": "Distribuie fisiere",
|
||||
"approve": "aprobă",
|
||||
"paired-device-removed": "Dispozitivul asociat a fost eliminat.",
|
||||
"share-text-title": "Partajați un mesaj text",
|
||||
"share-text-subtitle": "Editați mesajul înainte de a-l trimite:",
|
||||
"base64-title-text": "Partajați textul"
|
||||
},
|
||||
"about": {
|
||||
"claim": "Cel mai simplu mod de a transfera fișiere între dispozitive",
|
||||
@@ -152,7 +167,11 @@
|
||||
"close-about_aria-label": "Închide Despre PairDrop",
|
||||
"buy-me-a-coffee_title": "Cumpără-mi o cafea!",
|
||||
"github_title": "PairDrop pe GitHub",
|
||||
"faq_title": "Întrebări frecvente"
|
||||
"faq_title": "Întrebări frecvente",
|
||||
"bluesky_title": "Urmărește-ne pe BlueSky",
|
||||
"privacypolicy_title": "Deschideți politica noastră de confidențialitate",
|
||||
"mastodon_title": "Scrieți despre PairDrop pe Mastodon",
|
||||
"custom_title": "Urmăriți-ne"
|
||||
},
|
||||
"document-titles": {
|
||||
"file-transfer-requested": "Transfer de fișiere cerut",
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"cancel-share-mode": "Bitti",
|
||||
"join-public-room_title": "Geçici olarak genel odaya katılın",
|
||||
"language-selector_title": "Dili Seç",
|
||||
"edit-share-mode": "Düzenle"
|
||||
"edit-share-mode": "Düzenle",
|
||||
"expand_title": "Başlık düğmesi satırını genişlet"
|
||||
},
|
||||
"instructions": {
|
||||
"no-peers_data-drop-bg": "Alıcıyı seçmek için bırakın",
|
||||
@@ -166,7 +167,11 @@
|
||||
"close-about_aria-label": "PairDrop Hakkında'yı Kapat",
|
||||
"buy-me-a-coffee_title": "Bana bir kahve al!",
|
||||
"github_title": "GitHub'da PairDrop",
|
||||
"faq_title": "Sıkça sorulan sorular"
|
||||
"faq_title": "Sıkça sorulan sorular",
|
||||
"custom_title": "Bizi takip edin",
|
||||
"privacypolicy_title": "Gizlilik politikamızı açın",
|
||||
"mastodon_title": "Mastodon'da PairDrop hakkında yazın",
|
||||
"bluesky_title": "Bizi BlueSky'da takip edin"
|
||||
},
|
||||
"document-titles": {
|
||||
"file-transfer-requested": "Dosya Transferi Talep Edildi",
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
"cancel-share-mode": "完成",
|
||||
"join-public-room_title": "暂时加入公共房间",
|
||||
"language-selector_title": "设置语言",
|
||||
"edit-share-mode": "编辑"
|
||||
"edit-share-mode": "编辑",
|
||||
"expand_title": "展开标题按钮行"
|
||||
},
|
||||
"instructions": {
|
||||
"x-instructions_data-drop-peer": "释放以发送到此设备",
|
||||
@@ -114,7 +115,11 @@
|
||||
"github_title": "PairDrop 在 GitHub 上开源",
|
||||
"claim": "最简单的跨设备传输方案",
|
||||
"buy-me-a-coffee_title": "帮我买杯咖啡!",
|
||||
"tweet_title": "关于 PairDrop 的推特"
|
||||
"tweet_title": "关于 PairDrop 的推特",
|
||||
"bluesky_title": "在 BlueSky 上关注",
|
||||
"privacypolicy_title": "打开隐私政策",
|
||||
"mastodon_title": "在 Maston 上推广 PairDrop",
|
||||
"custom_title": "关注我们"
|
||||
},
|
||||
"notifications": {
|
||||
"display-name-changed-permanently": "展示的名字已经永久变更",
|
||||
|
||||
@@ -172,31 +172,34 @@ class PeersUI {
|
||||
}
|
||||
|
||||
_onDrop(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (this.shareMode.active || Dialog.anyDialogShown()) return;
|
||||
|
||||
if (!$$('x-peer') || !$$('x-peer').contains(e.target)) {
|
||||
if (e.dataTransfer.files.length > 0) {
|
||||
Events.fire('activate-share-mode', {files: e.dataTransfer.files});
|
||||
} else {
|
||||
for (let i=0; i<e.dataTransfer.items.length; i++) {
|
||||
if (e.dataTransfer.items[i].type === "text/plain") {
|
||||
e.dataTransfer.items[i].getAsString(text => {
|
||||
Events.fire('activate-share-mode', {text: text});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
e.preventDefault();
|
||||
|
||||
this._onDragEnd();
|
||||
|
||||
if ($$('x-peer') || !$$('x-peer').contains(e.target)) return; // dropped on peer
|
||||
|
||||
const files = e.dataTransfer.files;
|
||||
const text = e.dataTransfer.getData("text");
|
||||
|
||||
if (files.length > 0) {
|
||||
Events.fire('activate-share-mode', {
|
||||
files: files
|
||||
});
|
||||
}
|
||||
else if(text.length > 0) {
|
||||
Events.fire('activate-share-mode', {
|
||||
text: text
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_onDragOver(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (this.shareMode.active || Dialog.anyDialogShown()) return;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
this.$xInstructions.setAttribute('drop-bg', true);
|
||||
this.$xNoPeers.setAttribute('drop-bg', true);
|
||||
}
|
||||
@@ -590,6 +593,9 @@ class PeerUI {
|
||||
_onFilesSelected(e) {
|
||||
const $input = e.target;
|
||||
const files = $input.files;
|
||||
|
||||
if (files.length === 0) return;
|
||||
|
||||
Events.fire('files-selected', {
|
||||
files: files,
|
||||
to: this._peer.id
|
||||
@@ -630,29 +636,28 @@ class PeerUI {
|
||||
}
|
||||
|
||||
_onDrop(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (PeerUI._shareMode.active || Dialog.anyDialogShown()) return;
|
||||
|
||||
if (e.dataTransfer.files.length > 0) {
|
||||
Events.fire('files-selected', {
|
||||
files: e.dataTransfer.files,
|
||||
to: this._peer.id
|
||||
});
|
||||
} else {
|
||||
for (let i=0; i<e.dataTransfer.items.length; i++) {
|
||||
if (e.dataTransfer.items[i].type === "text/plain") {
|
||||
e.dataTransfer.items[i].getAsString(text => {
|
||||
Events.fire('send-text', {
|
||||
text: text,
|
||||
to: this._peer.id
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
e.preventDefault();
|
||||
|
||||
this._onDragEnd();
|
||||
|
||||
const peerId = this._peer.id;
|
||||
const files = e.dataTransfer.files;
|
||||
const text = e.dataTransfer.getData("text");
|
||||
|
||||
if (files.length > 0) {
|
||||
Events.fire('files-selected', {
|
||||
files: files,
|
||||
to: peerId
|
||||
});
|
||||
}
|
||||
else if (text.length > 0) {
|
||||
Events.fire('send-text', {
|
||||
text: text,
|
||||
to: peerId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
_onDragOver() {
|
||||
@@ -1896,6 +1901,8 @@ class SendTextDialog extends Dialog {
|
||||
this.$submit = this.$el.querySelector('button[type="submit"]');
|
||||
this.$form.addEventListener('submit', e => this._onSubmit(e));
|
||||
this.$text.addEventListener('input', _ => this._onInput());
|
||||
this.$text.addEventListener('paste', e => this._onPaste(e));
|
||||
this.$text.addEventListener('drop', e => this._onDrop(e));
|
||||
|
||||
Events.on('text-recipient', e => this._onRecipient(e.detail.peerId, e.detail.deviceName));
|
||||
Events.on('keydown', e => this._onKeyDown(e));
|
||||
@@ -1914,6 +1921,40 @@ class SendTextDialog extends Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
async _onDrop(e) {
|
||||
e.preventDefault()
|
||||
|
||||
const text = e.dataTransfer.getData("text");
|
||||
const selection = window.getSelection();
|
||||
|
||||
if (selection.rangeCount) {
|
||||
selection.deleteFromDocument();
|
||||
selection.getRangeAt(0).insertNode(document.createTextNode(text));
|
||||
}
|
||||
|
||||
this._onInput();
|
||||
}
|
||||
|
||||
async _onPaste(e) {
|
||||
e.preventDefault()
|
||||
|
||||
const text = (e.clipboardData || window.clipboardData).getData('text');
|
||||
const selection = window.getSelection();
|
||||
|
||||
if (selection.rangeCount) {
|
||||
selection.deleteFromDocument();
|
||||
const textNode = document.createTextNode(text);
|
||||
const range = document.createRange();
|
||||
range.setStart(textNode, textNode.length);
|
||||
range.collapse(true);
|
||||
selection.getRangeAt(0).insertNode(textNode);
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
}
|
||||
|
||||
this._onInput();
|
||||
}
|
||||
|
||||
_textEmpty() {
|
||||
return !this.$text.innerText || this.$text.innerText === "\n";
|
||||
}
|
||||
@@ -1978,12 +2019,15 @@ class ReceiveTextDialog extends Dialog {
|
||||
this._receiveTextQueue = [];
|
||||
}
|
||||
|
||||
selectionEmpty() {
|
||||
return !window.getSelection().toString()
|
||||
}
|
||||
|
||||
async _onKeyDown(e) {
|
||||
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()
|
||||
this.hide();
|
||||
}
|
||||
else if (e.code === "Escape") {
|
||||
this.hide();
|
||||
@@ -1994,12 +2038,22 @@ class ReceiveTextDialog extends Dialog {
|
||||
window.blop.play();
|
||||
this._receiveTextQueue.push({text: text, peerId: peerId});
|
||||
this._setDocumentTitleMessages();
|
||||
changeFavicon("images/favicon-96x96-notification.png");
|
||||
|
||||
if (this.isShown()) return;
|
||||
|
||||
this._dequeueRequests();
|
||||
}
|
||||
|
||||
_dequeueRequests() {
|
||||
if (!this._receiveTextQueue.length) return;
|
||||
if (!this._receiveTextQueue.length) {
|
||||
this.$text.innerHTML = "";
|
||||
return;
|
||||
}
|
||||
|
||||
this._setDocumentTitleMessages();
|
||||
changeFavicon("images/favicon-96x96-notification.png");
|
||||
|
||||
let {text, peerId} = this._receiveTextQueue.shift();
|
||||
this._showReceiveTextDialog(text, peerId);
|
||||
}
|
||||
@@ -2010,26 +2064,68 @@ class ReceiveTextDialog extends Dialog {
|
||||
this.$displayName.classList.add($(peerId).ui._badgeClassName());
|
||||
|
||||
this.$text.innerText = text;
|
||||
this.$text.classList.remove('text-center');
|
||||
|
||||
// Beautify text if text is short
|
||||
if (text.length < 2000) {
|
||||
// replace urls with actual links
|
||||
this.$text.innerHTML = this.$text.innerHTML.replace(/((https?:\/\/|www)[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\-._~:\/?#\[\]@!$&'()*+,;=]+)/g, url => {
|
||||
return `<a href="${url}" target="_blank">${url}</a>`;
|
||||
});
|
||||
// Beautify text if text is not too long
|
||||
if (this.$text.innerText.length <= 300000) {
|
||||
// Hacky workaround to replace URLs with link nodes in all cases
|
||||
// 1. Use text variable, find all valid URLs via regex and replace URLs with placeholder
|
||||
// 2. Use html variable, find placeholders with regex and replace them with link nodes
|
||||
|
||||
let $textShadow = document.createElement('div');
|
||||
$textShadow.innerText = text;
|
||||
|
||||
let linkNodes = {};
|
||||
let searchHTML = $textShadow.innerHTML;
|
||||
const p = "@";
|
||||
const pRgx = new RegExp(`${p}\\d+`, 'g');
|
||||
let occP = searchHTML.match(pRgx) || [];
|
||||
|
||||
let m = 0;
|
||||
|
||||
const allowedDomainChars = "a-zA-Z0-9áàäčçđéèêŋńñóòôöšŧüžæøåëìíîïðùúýþćěłřśţźǎǐǒǔǥǧǩǯəʒâûœÿãõāēīōūăąĉċďĕėęĝğġģĥħĩĭįıĵķĸĺļľņňŏőŕŗŝşťũŭůűųŵŷżאבגדהוזחטיךכלםמןנסעףפץצקרשתװױײ";
|
||||
const urlRgx = new RegExp(`(^|\\n|\\s|["><\\-_~:\\/?#\\[\\]@!$&'()*+,;=%.])(((https?:\\/\\/)?(?:[${allowedDomainChars}](?:[${allowedDomainChars}-]{0,61}[${allowedDomainChars}])?\\.)+[${allowedDomainChars}][${allowedDomainChars}-]{0,61}[${allowedDomainChars}])(:?\\d*)\\/?([${allowedDomainChars}_\\/\\-#.]*)(\\?([${allowedDomainChars}\\-_~:\\/?#\\[\\]@!$&'()*+,;=%.]*))?)`, 'g');
|
||||
|
||||
$textShadow.innerText = text.replace(urlRgx,
|
||||
(match, whitespaceOrSpecial, url, g3, scheme) => {
|
||||
let link = url;
|
||||
|
||||
// prefix www.example.com with http protocol to prevent it from being a relative link
|
||||
if (!scheme && link.startsWith('www')) {
|
||||
link = "http://" + link
|
||||
}
|
||||
|
||||
if (isUrlValid(link)) {
|
||||
// link is valid -> replace with link node placeholder
|
||||
|
||||
// find linkNodePlaceholder that is not yet present in text node
|
||||
m++;
|
||||
while (occP.includes(`${p}${m}`)) {
|
||||
m++;
|
||||
}
|
||||
let linkNodePlaceholder = `${p}${m}`;
|
||||
|
||||
// add linkNodePlaceholder to text node and save a reference to linkNodes object
|
||||
linkNodes[linkNodePlaceholder] = `<a href="${link}" target="_blank">${url}</a>`;
|
||||
return `${whitespaceOrSpecial}${linkNodePlaceholder}`;
|
||||
}
|
||||
// link is not valid -> do not replace
|
||||
return match;
|
||||
});
|
||||
|
||||
|
||||
this.$text.innerHTML = $textShadow.innerHTML.replace(pRgx,
|
||||
(m) => {
|
||||
let urlNode = linkNodes[m];
|
||||
return urlNode ? urlNode : m;
|
||||
});
|
||||
}
|
||||
|
||||
this._evaluateOverflowing(this.$text);
|
||||
|
||||
this._setDocumentTitleMessages();
|
||||
|
||||
changeFavicon("images/favicon-96x96-notification.png");
|
||||
this.show();
|
||||
}
|
||||
|
||||
_setDocumentTitleMessages() {
|
||||
document.title = !this._receiveTextQueue.length
|
||||
document.title = this._receiveTextQueue.length <= 1
|
||||
? `${ Localization.getTranslation("document-titles.message-received") } - PairDrop`
|
||||
: `${ Localization.getTranslation("document-titles.message-received-plural", null, {count: this._receiveTextQueue.length + 1}) } - PairDrop`;
|
||||
}
|
||||
@@ -2049,7 +2145,10 @@ class ReceiveTextDialog extends Dialog {
|
||||
|
||||
hide() {
|
||||
super.hide();
|
||||
setTimeout(() => this._dequeueRequests(), 500);
|
||||
setTimeout(() => {
|
||||
this._dequeueRequests();
|
||||
this.$text.innerHTML = "";
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -583,4 +583,14 @@ async function decodeBase64Text(base64) {
|
||||
if (!base64) throw new Error('Base64 is empty');
|
||||
|
||||
return decodeURIComponent(escape(window.atob(base64)))
|
||||
}
|
||||
|
||||
function isUrlValid(url) {
|
||||
try {
|
||||
let urlObj = new URL(url);
|
||||
return true;
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
const cacheVersion = 'v1.10.2';
|
||||
const cacheVersion = 'v1.10.7';
|
||||
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
|
||||
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
|
||||
const relativePathsToCache = [
|
||||
@@ -193,7 +193,7 @@ const evaluateRequestData = function (request) {
|
||||
|
||||
const objectStoreRequest = objectStore.add(fileObjects[i]);
|
||||
objectStoreRequest.onsuccess = _ => {
|
||||
if (i === fileObjects.length - 1) resolve(pairDropUrl + '?share-target=files');
|
||||
if (i === fileObjects.length - 1) resolve(pairDropUrl + '?share_target=files');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ const evaluateRequestData = function (request) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
let urlArgument = '?share-target=text';
|
||||
let urlArgument = '?share_target=text';
|
||||
|
||||
if (title) urlArgument += `&title=${title}`;
|
||||
if (text) urlArgument += `&text=${text}`;
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
display: block;
|
||||
overflow: auto;
|
||||
resize: none;
|
||||
line-height: 16px;
|
||||
max-height: 350px;
|
||||
word-break: break-word;
|
||||
word-wrap: anywhere;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.textarea:before {
|
||||
@@ -335,6 +335,7 @@ x-dialog x-paper {
|
||||
display: flex;
|
||||
margin: auto;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: 450px;
|
||||
z-index: 3;
|
||||
border-radius: 30px;
|
||||
@@ -382,10 +383,6 @@ x-dialog:not([show]) x-paper {
|
||||
transform: scale(0.1);
|
||||
}
|
||||
|
||||
x-dialog a {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* Pair Devices Dialog & Public Room Dialog */
|
||||
|
||||
.input-key-container {
|
||||
@@ -784,7 +781,7 @@ x-dialog x-paper {
|
||||
background-color: var(--bg-color-secondary) !important;
|
||||
}
|
||||
|
||||
.textarea * {
|
||||
.textarea *:not(a) {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
color: unset !important;
|
||||
@@ -797,6 +794,10 @@ x-dialog x-paper {
|
||||
font-weight: unset !important;
|
||||
}
|
||||
|
||||
x-dialog a {
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* Image/Video/Audio Preview */
|
||||
.file-preview {
|
||||
margin-bottom: 15px;
|
||||
|
||||
@@ -626,12 +626,15 @@ x-dialog:not([show]) x-background {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
background-color: var(--accent-color);
|
||||
transition: opacity 300ms;
|
||||
}
|
||||
|
||||
.icon-button:before {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.btn:not([disabled]):hover:before,
|
||||
.icon-button:hover:before {
|
||||
opacity: 0.3;
|
||||
|
||||
Reference in New Issue
Block a user