diff options
author | 2019-11-28 04:16:51 +0700 | |
---|---|---|
committer | 2019-11-28 04:16:51 +0700 | |
commit | 39805a4ea66da43f646e9117771c89b65c544b22 (patch) | |
tree | 37ff0fc82f1febf43c674220afcf40bbbe4a5584 | |
parent | Upgrade deps with major up requiring no refactor (diff) | |
download | ferdium-app-39805a4ea66da43f646e9117771c89b65c544b22.tar.gz ferdium-app-39805a4ea66da43f646e9117771c89b65c544b22.tar.zst ferdium-app-39805a4ea66da43f646e9117771c89b65c544b22.zip |
Upgrade react-dropzone and review usage breaking changes
-rw-r--r-- | package-lock.json | 28 | ||||
-rw-r--r-- | package.json | 2 | ||||
-rw-r--r-- | src/components/ui/ImageUpload.js | 12 |
3 files changed, 25 insertions, 17 deletions
diff --git a/package-lock.json b/package-lock.json index c432b9d27..9e73f97ec 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -6442,12 +6442,9 @@ | |||
6442 | "dev": true | 6442 | "dev": true |
6443 | }, | 6443 | }, |
6444 | "attr-accept": { | 6444 | "attr-accept": { |
6445 | "version": "1.1.3", | 6445 | "version": "2.0.0", |
6446 | "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", | 6446 | "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.0.0.tgz", |
6447 | "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", | 6447 | "integrity": "sha512-I9SDP4Wvh2ItYYoafEg8hFpsBe96pfQ+eabceShXt3sw2fbIP96+Aoj9zZE0vkZNAkXXzHJATVRuWz+h9FxJxQ==" |
6448 | "requires": { | ||
6449 | "core-js": "^2.5.0" | ||
6450 | } | ||
6451 | }, | 6448 | }, |
6452 | "auto-launch": { | 6449 | "auto-launch": { |
6453 | "version": "5.0.5", | 6450 | "version": "5.0.5", |
@@ -12103,6 +12100,14 @@ | |||
12103 | "object-assign": "^4.0.1" | 12100 | "object-assign": "^4.0.1" |
12104 | } | 12101 | } |
12105 | }, | 12102 | }, |
12103 | "file-selector": { | ||
12104 | "version": "0.1.12", | ||
12105 | "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.12.tgz", | ||
12106 | "integrity": "sha512-Kx7RTzxyQipHuiqyZGf+Nz4vY9R1XGxuQl/hLoJwq+J4avk/9wxxgZyHKtbyIPJmbD4A66DWGYfyykWNpcYutQ==", | ||
12107 | "requires": { | ||
12108 | "tslib": "^1.9.0" | ||
12109 | } | ||
12110 | }, | ||
12106 | "file-uri-to-path": { | 12111 | "file-uri-to-path": { |
12107 | "version": "1.0.0", | 12112 | "version": "1.0.0", |
12108 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", | 12113 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", |
@@ -22315,12 +22320,13 @@ | |||
22315 | } | 22320 | } |
22316 | }, | 22321 | }, |
22317 | "react-dropzone": { | 22322 | "react-dropzone": { |
22318 | "version": "7.0.1", | 22323 | "version": "10.2.1", |
22319 | "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-7.0.1.tgz", | 22324 | "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-10.2.1.tgz", |
22320 | "integrity": "sha512-J4rbzhFZPVW7k7K9CVb0OcwSOJGLWa0y+0rvtB4rBLVkvq0agH/o3kPJ0DCkd6ZVzL2K1NFqIOvtQkwQKpmJBA==", | 22325 | "integrity": "sha512-Me5nOu8hK9/Xyg5easpdfJ6SajwUquqYR/2YTdMotsCUgJ1pHIIwNsv0n+qcIno0tWR2V2rVQtj2r/hXYs2TnQ==", |
22321 | "requires": { | 22326 | "requires": { |
22322 | "attr-accept": "^1.1.3", | 22327 | "attr-accept": "^2.0.0", |
22323 | "prop-types": "^15.6.2" | 22328 | "file-selector": "^0.1.12", |
22329 | "prop-types": "^15.7.2" | ||
22324 | } | 22330 | } |
22325 | }, | 22331 | }, |
22326 | "react-electron-web-view": { | 22332 | "react-electron-web-view": { |
diff --git a/package.json b/package.json index 024537020..f0d630813 100644 --- a/package.json +++ b/package.json | |||
@@ -102,7 +102,7 @@ | |||
102 | "react-addons-css-transition-group": "15.6.2", | 102 | "react-addons-css-transition-group": "15.6.2", |
103 | "react-confetti": "5.0.1", | 103 | "react-confetti": "5.0.1", |
104 | "react-dom": "16.12.0", | 104 | "react-dom": "16.12.0", |
105 | "react-dropzone": "7.0.1", | 105 | "react-dropzone": "10.2.1", |
106 | "react-electron-web-view": "^2.0.1", | 106 | "react-electron-web-view": "^2.0.1", |
107 | "react-intl": "2.7.2", | 107 | "react-intl": "2.7.2", |
108 | "react-jss": "8.6.1", | 108 | "react-jss": "8.6.1", |
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js index 83a05554b..636d4fae3 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -89,14 +89,16 @@ export default @observer class ImageUpload extends Component { | |||
89 | <Dropzone | 89 | <Dropzone |
90 | ref={(node) => { this.dropzoneRef = node; }} | 90 | ref={(node) => { this.dropzoneRef = node; }} |
91 | onDrop={this.onDrop.bind(this)} | 91 | onDrop={this.onDrop.bind(this)} |
92 | className={cssClasses} | ||
93 | multiple={multiple} | 92 | multiple={multiple} |
94 | accept="image/jpeg, image/png" | 93 | accept="image/jpeg, image/png" |
95 | > | 94 | > |
96 | <i className="mdi mdi-file-image" /> | 95 | {({ getRootProps, getInputProps }) => ( |
97 | <p> | 96 | <div {...getRootProps()} className={cssClasses}> |
98 | {textUpload} | 97 | <i className="mdi mdi-file-image" /> |
99 | </p> | 98 | <p>{textUpload}</p> |
99 | <input {...getInputProps()} /> | ||
100 | </div> | ||
101 | )} | ||
100 | </Dropzone> | 102 | </Dropzone> |
101 | )} | 103 | )} |
102 | </div> | 104 | </div> |