diff --git a/app/.eslintrc.js b/app/.eslintrc.js
index 6d49fa4..6ec2ca4 100644
--- a/app/.eslintrc.js
+++ b/app/.eslintrc.js
@@ -172,7 +172,7 @@ module.exports =
'semi': [ 2, 'always' ],
'semi-spacing': 2,
'space-before-blocks': 2,
- 'space-before-function-paren': [ 2, 'never' ],
+ 'space-before-function-paren': [ 2, { anonymous: 'never', named: 'never', 'asyncArrow': 'always'}],
'space-in-parens': [ 2, 'never' ],
'spaced-comment': [ 2, 'always' ],
'strict': 2,
diff --git a/app/lib/components/FileSharing/DragDropSharing.jsx b/app/lib/components/FileSharing/DragDropSharing.jsx
index 9802ca6..279989c 100644
--- a/app/lib/components/FileSharing/DragDropSharing.jsx
+++ b/app/lib/components/FileSharing/DragDropSharing.jsx
@@ -1,14 +1,18 @@
import React from 'react';
+import WebTorrent from 'webtorrent';
import dragDrop from 'drag-drop';
import { shareFiles } from './index';
export const configureDragDrop = () =>
{
- dragDrop('body', async(files) => await shareFiles(files));
+ if (WebTorrent.WEBRTC_SUPPORT)
+ {
+ dragDrop('body', async (files) => await shareFiles(files));
+ }
};
export const HoldingOverlay = () => (
@@ -109,9 +116,11 @@ class FileSharing extends Component
- Share file
+ {buttonDescription}
diff --git a/app/package-lock.json b/app/package-lock.json
index 2af90be..3173cc2 100644
--- a/app/package-lock.json
+++ b/app/package-lock.json
@@ -4969,12 +4969,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -4989,17 +4991,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"core-util-is": {
"version": "1.0.2",
@@ -5116,7 +5121,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"ini": {
"version": "1.3.5",
@@ -5128,6 +5134,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@@ -5142,6 +5149,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -5260,7 +5268,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
- "dev": true
+ "dev": true,
+ "optional": true
},
"object-assign": {
"version": "4.1.1",
@@ -5272,6 +5281,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"wrappy": "1"
}
@@ -5393,6 +5403,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
+ "optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
diff --git a/app/stylus/components/FileSharing.styl b/app/stylus/components/FileSharing.styl
index dd158da..c5b9bc7 100644
--- a/app/stylus/components/FileSharing.styl
+++ b/app/stylus/components/FileSharing.styl
@@ -8,6 +8,10 @@
padding: 1rem;
border-bottom: 5px solid #151515;
border-radius: 3px 3px 0 0;
+
+ &.disabled {
+ cursor: not-allowed;
+ }
}
}