replace "snapdrop" with "pairdrop" and change links accordingly + add changes to faq and readme
This commit is contained in:
parent
bef7459019
commit
fed9d17dc8
12 changed files with 100 additions and 124 deletions
43
README.md
43
README.md
|
@ -1,9 +1,31 @@
|
|||
# Snapdrop
|
||||
# Pairdrop
|
||||
|
||||
[Snapdrop](https://snapdrop.net): local file sharing in your browser. Inspired by Apple's Airdrop.
|
||||
[Pairdrop](https://pairdrop.net): local file sharing in your browser. Inspired by Apple's Airdrop.
|
||||
|
||||
Developed based on [Snapdrop](https://github.com/RobinLinus/snapdrop)
|
||||
|
||||
## Differences to Snapdrop
|
||||
|
||||
### Device Pairing
|
||||
* Pair devices via 6-digit code or QR-Code
|
||||
* Pair devices outside your local network or in complex network environment (public wifi, company network, Apple Private Relay, VPN etc.).
|
||||
* Paired devices will always find each other via shared secrets even after reopening the browser or the Progressive Web App
|
||||
* You will always discover devices on your local network. Paired devices are shown additionally.
|
||||
* Paired devices outside your local network that are behind a NAT are connected automatically via [Open Relay: Free WebRTC TURN Server](https://www.metered.ca/tools/openrelay/)
|
||||
|
||||
|
||||
#### Snapdrop is built with the following awesome technologies:
|
||||
### Other changes
|
||||
* node-only implementation (thanks [@Bellisario](https://github.com/Bellisario))
|
||||
* automatic restart on error (thanks [@KaKi87](https://github.com/KaKi87))
|
||||
* lots of stability fixes (thanks [@MWY001](https://github.com/MWY001) [@skiby7](https://github.com/skiby7) [@willstott101](https://github.com/willstott101))
|
||||
* [Paste Mode](https://github.com/RobinLinus/snapdrop/pull/534)
|
||||
* [Video and Audio preview](https://github.com/RobinLinus/snapdrop/pull/455) (thanks [@victorwads](https://github.com/victorwads))
|
||||
|
||||
## Screenshot
|
||||
![test](/docs/pairdrop_screenshot_desktop.png)
|
||||
|
||||
|
||||
## Snapdrop and Pairdrop are 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
|
||||
|
@ -15,18 +37,13 @@ Have any questions? Read our [FAQ](/docs/faq.md).
|
|||
You can [host your own instance with Docker](/docs/host-your-own.md).
|
||||
|
||||
|
||||
## Support the Snapdrop Community
|
||||
Snapdrop is free. Still, we have to pay for the server. If you want to contribute, please use PayPal:
|
||||
## Support the Community
|
||||
Pairdrop is free and always will be!
|
||||
|
||||
[<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif">](https://www.paypal.com/donate/?hosted_button_id=MG8GV7YCYT352)
|
||||
If you want to support me and my work you can [buy me a coffee](https://www.buymeacoffee.com/pairdrop) ☕
|
||||
|
||||
or Bitcoin:
|
||||
<br>
|
||||
|
||||
[<img src="https://coins.github.io/thx/logo-color-large-pill-320px.png" alt="CoinThx" width="200"/>](https://coins.github.io/thx/#1K9zQ8f4iTyhKyHWmiDKt21cYX2QSDckWB?label=Snapdrop&message=Thanks!%20Your%20contribution%20helps%20to%20keep%20Snapdrop%20free%20for%20everybody!)
|
||||
|
||||
Alternatively, you can become a [Github Sponsor](https://github.com/sponsors/RobinLinus).
|
||||
To support the original Snapdrop and its creator go to [his GitHub page](https://github.com/RobinLinus/snapdrop).
|
||||
|
||||
Thanks a lot for supporting free and open software!
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ string_mask = utf8only
|
|||
prompt = no
|
||||
|
||||
[ subject ]
|
||||
organizationName = Snapdrop
|
||||
organizationName = Pairdrop
|
||||
OU = Development
|
||||
|
||||
# Use a friendly name here because it's presented to the user. The server's DNS
|
||||
|
@ -26,4 +26,4 @@ basicConstraints = CA:FALSE
|
|||
keyUsage = digitalSignature, keyEncipherment
|
||||
subjectAltName = DNS:${ENV::FQDN}
|
||||
nsComment = "OpenSSL Generated Certificate"
|
||||
extendedKeyUsage = serverAuth
|
||||
extendedKeyUsage = serverAuth
|
||||
|
|
53
docs/faq.md
53
docs/faq.md
|
@ -11,65 +11,36 @@
|
|||
* [Producthunt](https://www.producthunt.com/posts/snapdrop)
|
||||
|
||||
### Help! I can't install the PWA!
|
||||
if you are using a Chromium-based browser (Chrome, Edge, Brave, etc.), you can easily install Snapdrop PWA on your desktop by clicking the install button in the top-right corner while on [snapdrop.net](https://snapdrop.net) (see below).
|
||||
if you are using a Chromium-based browser (Chrome, Edge, Brave, etc.), you can easily install Pairdrop PWA on your desktop by clicking the install button in the top-right corner while on [pairdrop.net](https://pairdrop.net) (see below).
|
||||
<img src="pwa-install.png">
|
||||
|
||||
### What about the connection? Is it a P2P-connection directly from device to device or is there any third-party-server?
|
||||
It uses a P2P connection if WebRTC is supported by the browser. WebRTC needs a Signaling Server, but it is only used to establish a connection and is not involved in the file transfer.
|
||||
|
||||
If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages.
|
||||
|
||||
### What about privacy? Will files be saved on third-party-servers?
|
||||
None of your files are ever sent to any server. Files are sent only between peers. Snapdrop doesn't even use a database. If you are curious have a look [at the Server](https://github.com/RobinLinus/snapdrop/blob/master/server/). Even if Snapdrop was able to view the files being transfered, WebRTC encrypts the files on transit, so the server would be unable to read them.
|
||||
None of your files are ever sent to any server. Files are sent only between peers. Pairdrop doesn't even use a database. If you are curious have a look [at the Server](https://github.com/schlagmichdoch/pairdrop/blob/master/server/).
|
||||
WebRTC encrypts the files on transit.
|
||||
|
||||
If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages.
|
||||
|
||||
### What about security? Are my files encrypted while being sent between the computers?
|
||||
Yes. Your files are sent using WebRTC, which encrypts them on transit.
|
||||
|
||||
### Why don't you implement feature xyz?
|
||||
Snapdrop is a study in radical simplicity. The user interface is insanely simple. Features are chosen very carefully because complexity grows quadratically since every feature potentially interferes with each other feature. We focus very narrowly on a single use case: instant file transfer.
|
||||
Snapdrop and Pairdrop are a study in radical simplicity. The user interface is insanely simple. Features are chosen very carefully because complexity grows quadratically since every feature potentially interferes with each other feature. We focus very narrowly on a single use case: instant file transfer.
|
||||
We are not trying to optimize for some edge-cases. We are optimizing the user flow of the average users. Don't be sad if we decline your feature request for the sake of simplicity.
|
||||
|
||||
If you want to learn more about simplicity you can read [Insanely Simple: The Obsession that Drives Apple's Success](https://www.amazon.com/Insanely-Simple-Ken-Segall-audiobook/dp/B007Z9686O) or [Thinking, Fast and Slow](https://www.amazon.com/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374533555).
|
||||
|
||||
|
||||
### Snapdrop is awesome! How can I support it?
|
||||
* [Donate via PayPal to help cover the server costs](https://www.paypal.com/donate/?hosted_button_id=FTP9DXUR7LA7Q)
|
||||
* [File bugs, give feedback, submit suggestions](https://github.com/RobinLinus/snapdrop/issues)
|
||||
* Share Snapdrop on your social media.
|
||||
### Snapdrop and Pairdrop are awesome! How can I support them?
|
||||
* [Buy me a cover to support open source software](https://www.buymeacoffee.com/pairdrop)
|
||||
* [File bugs, give feedback, submit suggestions](https://github.com/schlagmichdoch/pairdrop/issues)
|
||||
* Share Pairdrop on social media.
|
||||
* Fix bugs and make a pull request.
|
||||
* Do security analysis and suggestions
|
||||
|
||||
|
||||
## "Inofficial" Instances
|
||||
Here's a list of other people hosting inofficial instances of Snapdrop:
|
||||
|
||||
- https://snapdrop.k26.ch/
|
||||
- https://snapdrop.9pfs.repl.co/
|
||||
- https://filedrop.codext.de/
|
||||
- https://s.hoothin.com/
|
||||
- https://www.wulingate.com/
|
||||
- https://snapdrop.fairysoft.net/
|
||||
- https://airtransferer.web.app/
|
||||
- https://drop.wuyuan.dev
|
||||
|
||||
DISCLAIMER: WE ARE NOT IN ANY WAY AFFILIATED WITH THE PEOPLE WHO RUN THESE INSTANCES. WE DO NOT KNOW THEM. WE CANNOT VERIFY THE CODE THEY ARE RUNNING!
|
||||
|
||||
|
||||
## Third-Party Apps
|
||||
Here's a list of some third-party Snapdrop apps:
|
||||
|
||||
1. [Snapdrop Desktop App](https://github.com/alextwothousand/snapdrop-desktop) built on top of Electron. (Thanks to [alextwothousand!](https://github.com/alextwothousand/)).
|
||||
|
||||
1. [Snapdrop Android App](https://github.com/fm-sys/snapdrop-android) allows you to also send files directly from other apps via the share action.
|
||||
|
||||
1. [Snapdrop Flutter App](https://github.com/congnguyendinh0/snapdrop_flutter)
|
||||
|
||||
1. [Snapdrop iOS App](https://github.com/CDsigma/Snapdrop-iOS-App)
|
||||
|
||||
1. [Snapdrop Node App (with completely Node server)](https://github.com/Bellisario/node-snapdrop)
|
||||
|
||||
1. [SnapDrop VSCode Extension](https://github.com/Yash-Garg/snapdrop-vsc)
|
||||
|
||||
1. Feel free to make one :)
|
||||
|
||||
|
||||
|
||||
[< Back](/README.md)
|
||||
|
|
|
@ -5,10 +5,10 @@ First, [Install docker with docker-compose.](https://docs.docker.com/compose/ins
|
|||
|
||||
Then, clone the repository and run docker-compose:
|
||||
```shell
|
||||
git clone https://github.com/RobinLinus/snapdrop.git
|
||||
git clone https://github.com/schlagmichdoch/pairdrop.git
|
||||
```
|
||||
```shell
|
||||
cd snapdrop
|
||||
cd pairdrop
|
||||
```
|
||||
```shell
|
||||
docker-compose up -d
|
||||
|
@ -17,21 +17,9 @@ Now point your browser to `http://localhost:8080`.
|
|||
|
||||
- To restart the containers run `docker-compose restart`.
|
||||
- To stop the containers run `docker-compose stop`.
|
||||
- To debug the NodeJS server run `docker logs snapdrop_node_1`.
|
||||
- To debug the NodeJS server run `docker logs pairdrop_node_1`.
|
||||
|
||||
|
||||
## Run locally by pulling image from Docker Hub
|
||||
|
||||
Have docker installed, then use the command:
|
||||
```shell
|
||||
docker pull linuxserver/snapdrop
|
||||
```
|
||||
|
||||
To run the image, type (if port 8080 is occupied by host use another random port <random port>:80):
|
||||
```shell
|
||||
docker run -d -p 8080:80 linuxserver/snapdrop
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## Testing PWA related features
|
||||
|
@ -69,7 +57,7 @@ server {
|
|||
expires epoch;
|
||||
|
||||
location / {
|
||||
root /var/www/snapdrop/client;
|
||||
root /var/www/pairdrop/client;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
|
@ -84,13 +72,13 @@ server {
|
|||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
ssl_certificate /etc/ssl/certs/snapdrop-dev.crt;
|
||||
ssl_certificate_key /etc/ssl/certs/snapdrop-dev.key;
|
||||
ssl_certificate /etc/ssl/certs/pairdrop-dev.crt;
|
||||
ssl_certificate_key /etc/ssl/certs/pairdrop-dev.key;
|
||||
|
||||
expires epoch;
|
||||
|
||||
location / {
|
||||
root /var/www/snapdrop/client;
|
||||
root /var/www/pairdrop/client;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
|
@ -107,7 +95,7 @@ server {
|
|||
### Using Apache
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
DocumentRoot "/var/www/snapdrop/client"
|
||||
DocumentRoot "/var/www/pairdrop/client"
|
||||
DirectoryIndex index.html
|
||||
|
||||
RewriteEngine on
|
||||
|
@ -116,7 +104,7 @@ server {
|
|||
RewriteRule ^/?(.*) "ws://127.0.0.1:3000/$1" [P,L]
|
||||
</VirtualHost>
|
||||
<VirtualHost *:443>
|
||||
DocumentRoot "/var/www/snapdrop/client"
|
||||
DocumentRoot "/var/www/pairdrop/client"
|
||||
DirectoryIndex index.html
|
||||
|
||||
RewriteEngine on
|
||||
|
@ -127,11 +115,11 @@ server {
|
|||
```
|
||||
|
||||
## Deployment with Docker
|
||||
The easiest way to get snapdrop up and running is by using Docker.
|
||||
The easiest way to get Pairdrop up and running is by using Docker.
|
||||
|
||||
By default, docker listens on ports 8080 (http) and 8443 (https) (specified in `docker-compose.yml`).
|
||||
|
||||
When running Snapdrop via Docker, the `X-Forwarded-For` header has to be set by a proxy. Otherwise, all clients will be mutually visible.
|
||||
When running Pairdrop via Docker, the `X-Forwarded-For` header has to be set by a proxy. Otherwise, all clients will be mutually visible.
|
||||
|
||||
### Installation
|
||||
[See Local Development > Install](#install)
|
||||
|
@ -162,8 +150,8 @@ server {
|
|||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
ssl_certificate /etc/ssl/certs/snapdrop-dev.crt;
|
||||
ssl_certificate_key /etc/ssl/certs/snapdrop-dev.key;
|
||||
ssl_certificate /etc/ssl/certs/pairdrop-dev.crt;
|
||||
ssl_certificate_key /etc/ssl/certs/pairdrop-dev.key;
|
||||
|
||||
expires epoch;
|
||||
|
||||
|
@ -198,7 +186,7 @@ a2enmod proxy_wstunnel
|
|||
|
||||
Create a new configuration file under `/etc/apache2/sites-available` (on debian)
|
||||
|
||||
**snapdrop.conf**
|
||||
**pairdrop.conf**
|
||||
```
|
||||
<VirtualHost *:80>
|
||||
ProxyPass / http://127.0.0.1:8080/
|
||||
|
@ -217,7 +205,7 @@ Create a new configuration file under `/etc/apache2/sites-available` (on debian)
|
|||
```
|
||||
Activate the new virtual host and reload apache:
|
||||
```shell
|
||||
a2ensite snapdrop
|
||||
a2ensite pairdrop
|
||||
```
|
||||
```shell
|
||||
service apache2 reload
|
||||
|
|
BIN
docs/pairdrop_screenshot_desktop.png
Normal file
BIN
docs/pairdrop_screenshot_desktop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 348 KiB |
6
index.js
6
index.js
|
@ -81,7 +81,7 @@ server.listen(port);
|
|||
const parser = require('ua-parser-js');
|
||||
const { uniqueNamesGenerator, animals, colors } = require('unique-names-generator');
|
||||
|
||||
class SnapdropServer {
|
||||
class PairdropServer {
|
||||
|
||||
constructor() {
|
||||
const WebSocket = require('ws');
|
||||
|
@ -91,7 +91,7 @@ class SnapdropServer {
|
|||
this._rooms = {};
|
||||
this._roomSecrets = {};
|
||||
|
||||
console.log('Snapdrop is running on port', port);
|
||||
console.log('Pairdrop is running on port', port);
|
||||
}
|
||||
|
||||
_onConnection(peer) {
|
||||
|
@ -588,4 +588,4 @@ Object.defineProperty(String.prototype, 'hashCode', {
|
|||
}
|
||||
});
|
||||
|
||||
new SnapdropServer();
|
||||
new PairdropServer();
|
||||
|
|
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "snapdrop",
|
||||
"name": "pairdrop",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "snapdrop",
|
||||
"name": "pairdrop",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "snapdrop",
|
||||
"name": "pairdrop",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
|
|
|
@ -5,22 +5,22 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<!-- Web App Config -->
|
||||
<title>Snapdrop</title>
|
||||
<title>Pairdrop</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<meta name="theme-color" content="#3367d6">
|
||||
<meta name="color-scheme" content="dark light">
|
||||
<meta name="apple-mobile-web-app-capable" content="no">
|
||||
<meta name="apple-mobile-web-app-title" content="Snapdrop">
|
||||
<meta name="application-name" content="Snapdrop">
|
||||
<meta name="apple-mobile-web-app-title" content="Pairdrop">
|
||||
<meta name="application-name" content="Pairdrop">
|
||||
<!-- Descriptions -->
|
||||
<meta name="description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
|
||||
<meta name="keywords" content="File, Transfer, Share, Peer2Peer">
|
||||
<meta name="author" content="RobinLinus">
|
||||
<meta property="og:title" content="Snapdrop">
|
||||
<meta property="og:title" content="Pairdrop">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:url" content="https://snapdrop.net/">
|
||||
<meta property="og:author" content="https://facebook.com/RobinLinus">
|
||||
<meta name="twitter:author" content="@RobinLinus">
|
||||
<meta property="og:url" content="https://pairdrop.net/">
|
||||
<meta property="og:author" content="https://github.com/schlagmichdoch">
|
||||
<meta name="twitter:author" content="@schlagmichdoch">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
|
||||
<meta name="og:description" content="Instantly share images, videos, PDFs, and links with people nearby. Peer2Peer and Open Source. No Setup, No Signup.">
|
||||
|
@ -30,8 +30,8 @@
|
|||
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
|
||||
<meta name="msapplication-TileImage" content="images/mstile-150x150.png">
|
||||
<link rel="fluid-icon" type="image/png" href="images/android-chrome-192x192.png">
|
||||
<meta name="twitter:image" content="https://snapdrop.net/images/twitter-stream.jpg">
|
||||
<meta property="og:image" content="https://snapdrop.net/images/twitter-stream.jpg">
|
||||
<meta name="twitter:image" content="https://pairdrop.net/images/twitter-stream.jpg">
|
||||
<meta property="og:image" content="https://pairdrop.net/images/twitter-stream.jpg">
|
||||
<!-- Resources -->
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
<link rel="manifest" href="manifest.json">
|
||||
|
@ -39,7 +39,7 @@
|
|||
|
||||
<body translate="no">
|
||||
<header class="row-reverse">
|
||||
<a href="#about" class="icon-button" title="About Snapdrop">
|
||||
<a href="#about" class="icon-button" title="About Pairdrop">
|
||||
<svg class="icon">
|
||||
<use xlink:href="#info-outline" />
|
||||
</svg>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<use xlink:href="#notifications" />
|
||||
</svg>
|
||||
</a>
|
||||
<a id="install" class="icon-button" title="Install Snapdrop" hidden>
|
||||
<a id="install" class="icon-button" title="Install Pairdrop" hidden>
|
||||
<svg class="icon">
|
||||
<use xlink:href="#homescreen" />
|
||||
</svg>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<!-- Peers -->
|
||||
<x-peers class="center"></x-peers>
|
||||
<x-no-peers>
|
||||
<h2>Open Snapdrop on other devices to send files</h2>
|
||||
<h2>Open Pairdrop on other devices to send files</h2>
|
||||
<div>Pair devices to be discoverable on other networks</div>
|
||||
</x-no-peers>
|
||||
<x-instructions desktop="Click to send files or right click to send a message" mobile="Tap to send files or long tap to send a message"></x-instructions>
|
||||
|
@ -191,10 +191,10 @@
|
|||
<svg class="icon logo">
|
||||
<use xlink:href="#wifi-tethering" />
|
||||
</svg>
|
||||
<h1>Snapdrop</h1>
|
||||
<h1>Pairdrop</h1>
|
||||
<div class="font-subheading">The easiest way to transfer files across devices</div>
|
||||
<div class="row">
|
||||
<a class="icon-button" target="_blank" href="https://github.com/RobinLinus/snapdrop" title="Snapdrop on Github" rel="noreferrer">
|
||||
<a class="icon-button" target="_blank" href="https://github.com/schlagmichdoch/pairdrop" title="Pairdrop on Github" rel="noreferrer">
|
||||
<svg class="icon">
|
||||
<use xlink:href="#github" />
|
||||
</svg>
|
||||
|
@ -204,12 +204,12 @@
|
|||
<use xlink:href="#monetarization" />
|
||||
</svg>
|
||||
</a>
|
||||
<a class="icon-button" target="_blank" href="https://twitter.com/intent/tweet?text=https://snapdrop.net%20by%20@robin_linus%20&" title="Tweet about Snapdrop" rel="noreferrer">
|
||||
<a class="icon-button" target="_blank" href="https://twitter.com/intent/tweet?text=https%3A%2F%2Fpairdrop.net%20by%20https%3A%2F%2Fgithub.com%2Fschlagmichdoch%2F&" title="Tweet about Pairdrop" rel="noreferrer">
|
||||
<svg class="icon">
|
||||
<use xlink:href="#twitter" />
|
||||
</svg>
|
||||
</a>
|
||||
<a class="icon-button" target="_blank" href="https://github.com/RobinLinus/snapdrop/blob/master/docs/faq.md" title="Frequently asked questions" rel="noreferrer">
|
||||
<a class="icon-button" target="_blank" href="https://github.com/schlagmichdoch/pairdrop/blob/master/docs/faq.md" title="Frequently asked questions" rel="noreferrer">
|
||||
<svg class="icon">
|
||||
<use xlink:href="#help-outline" />
|
||||
</svg>
|
||||
|
@ -286,7 +286,7 @@
|
|||
<noscript>
|
||||
<x-noscript class="full center column">
|
||||
<h1>Enable JavaScript</h1>
|
||||
<h3>Snapdrop works only with JavaScript</h3>
|
||||
<h3>Pairdrop works only with JavaScript</h3>
|
||||
</x-noscript>
|
||||
<style>
|
||||
x-noscript {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Snapdrop",
|
||||
"short_name": "Snapdrop",
|
||||
"name": "Pairdrop",
|
||||
"short_name": "Pairdrop",
|
||||
"icons": [{
|
||||
"src": "images/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
|
|
|
@ -146,13 +146,13 @@ class PeersUI {
|
|||
|
||||
if (files.length === 1) {
|
||||
descriptor = files[0].name;
|
||||
noPeersMessage = `Open Snapdrop on other devices to send <i>${descriptor}</i> directly`;
|
||||
noPeersMessage = `Open Pairdrop on other devices to send <i>${descriptor}</i> directly`;
|
||||
} else if (files.length > 1) {
|
||||
descriptor = `${files.length} files`;
|
||||
noPeersMessage = `Open Snapdrop on other devices to send ${descriptor} directly`;
|
||||
noPeersMessage = `Open Pairdrop on other devices to send ${descriptor} directly`;
|
||||
} else if (text.length > 0) {
|
||||
descriptor = `pasted text`;
|
||||
noPeersMessage = `Open Snapdrop on other devices to send ${descriptor} directly`;
|
||||
noPeersMessage = `Open Pairdrop on other devices to send ${descriptor} directly`;
|
||||
}
|
||||
|
||||
const xInstructions = document.querySelectorAll('x-instructions')[0];
|
||||
|
@ -197,7 +197,7 @@ class PeersUI {
|
|||
xInstructions.setAttribute('mobile', 'Tap to send files or long tap to send a message');
|
||||
|
||||
const xNoPeers = document.querySelectorAll('x-no-peers')[0];
|
||||
xNoPeers.getElementsByTagName('h2')[0].innerHTML = 'Open Snapdrop on other devices to send files';
|
||||
xNoPeers.getElementsByTagName('h2')[0].innerHTML = 'Open Pairdrop on other devices to send files';
|
||||
|
||||
const cancelPasteModeBtn = document.getElementById('cancelPasteModeBtn');
|
||||
cancelPasteModeBtn.removeEventListener('click', this._cancelPasteMode);
|
||||
|
@ -1001,7 +1001,7 @@ class PersistentStorage {
|
|||
this.logBrowserNotCapable();
|
||||
return;
|
||||
}
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onerror = (e) => {
|
||||
this.logBrowserNotCapable();
|
||||
console.log('Error initializing database: ');
|
||||
|
@ -1025,7 +1025,7 @@ class PersistentStorage {
|
|||
|
||||
static set(key, value) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('keyval', 'readwrite');
|
||||
|
@ -1044,7 +1044,7 @@ class PersistentStorage {
|
|||
|
||||
static get(key) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('keyval', 'readwrite');
|
||||
|
@ -1062,7 +1062,7 @@ class PersistentStorage {
|
|||
}
|
||||
static delete(key) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('keyval', 'readwrite');
|
||||
|
@ -1081,7 +1081,7 @@ class PersistentStorage {
|
|||
|
||||
static addRoomSecret(roomSecret) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('room_secrets', 'readwrite');
|
||||
|
@ -1100,7 +1100,7 @@ class PersistentStorage {
|
|||
|
||||
static getAllRoomSecrets() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('room_secrets', 'readwrite');
|
||||
|
@ -1123,7 +1123,7 @@ class PersistentStorage {
|
|||
|
||||
static deleteRoomSecret(room_secret) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('room_secrets', 'readwrite');
|
||||
|
@ -1153,7 +1153,7 @@ class PersistentStorage {
|
|||
|
||||
static clearRoomSecrets() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const DBOpenRequest = window.indexedDB.open('snapdrop_store');
|
||||
const DBOpenRequest = window.indexedDB.open('pairdrop_store');
|
||||
DBOpenRequest.onsuccess = (e) => {
|
||||
const db = e.target.result;
|
||||
const transaction = db.transaction('room_secrets', 'readwrite');
|
||||
|
@ -1171,7 +1171,7 @@ class PersistentStorage {
|
|||
}
|
||||
}
|
||||
|
||||
class Snapdrop {
|
||||
class Pairdrop {
|
||||
constructor() {
|
||||
Events.on('load', _ => {
|
||||
const server = new ServerConnection();
|
||||
|
@ -1191,7 +1191,7 @@ class Snapdrop {
|
|||
}
|
||||
|
||||
const persistentStorage = new PersistentStorage();
|
||||
const snapdrop = new Snapdrop();
|
||||
const pairdrop = new Pairdrop();
|
||||
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
|
@ -1292,7 +1292,7 @@ Events.on('load', () => {
|
|||
animate();
|
||||
});
|
||||
|
||||
// close About Snapdrop page on Escape
|
||||
// close About Pairdrop page on Escape
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") {
|
||||
window.location.hash = '#';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var CACHE_NAME = 'snapdrop-cache-v2';
|
||||
var CACHE_NAME = 'pairdrop-cache-v2';
|
||||
var urlsToCache = [
|
||||
'index.html',
|
||||
'./',
|
||||
|
|
Loading…
Reference in a new issue