diff options
author | 2019-11-28 04:53:50 +0700 | |
---|---|---|
committer | 2019-11-28 04:53:50 +0700 | |
commit | 63c9095ebabcd7ead1cdbd483fe6f2d1ee15399e (patch) | |
tree | 25cd494f3a407c9ecf0303597d7cd3f7f2b78fe2 | |
parent | Revert "Upgrade deps with major up requiring no refactor" (diff) | |
download | ferdium-app-63c9095ebabcd7ead1cdbd483fe6f2d1ee15399e.tar.gz ferdium-app-63c9095ebabcd7ead1cdbd483fe6f2d1ee15399e.tar.zst ferdium-app-63c9095ebabcd7ead1cdbd483fe6f2d1ee15399e.zip |
Revert "Upgrade react-dropzone and review usage breaking changes"
This reverts commit 39805a4ea66da43f646e9117771c89b65c544b22.
-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, 17 insertions, 25 deletions
diff --git a/package-lock.json b/package-lock.json index 8c3207b2c..5f62342a6 100644 --- a/package-lock.json +++ b/package-lock.json | |||
@@ -6220,9 +6220,12 @@ | |||
6220 | "dev": true | 6220 | "dev": true |
6221 | }, | 6221 | }, |
6222 | "attr-accept": { | 6222 | "attr-accept": { |
6223 | "version": "2.0.0", | 6223 | "version": "1.1.3", |
6224 | "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-2.0.0.tgz", | 6224 | "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", |
6225 | "integrity": "sha512-I9SDP4Wvh2ItYYoafEg8hFpsBe96pfQ+eabceShXt3sw2fbIP96+Aoj9zZE0vkZNAkXXzHJATVRuWz+h9FxJxQ==" | 6225 | "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", |
6226 | "requires": { | ||
6227 | "core-js": "^2.5.0" | ||
6228 | } | ||
6226 | }, | 6229 | }, |
6227 | "auto-launch": { | 6230 | "auto-launch": { |
6228 | "version": "5.0.5", | 6231 | "version": "5.0.5", |
@@ -11760,14 +11763,6 @@ | |||
11760 | "object-assign": "^4.0.1" | 11763 | "object-assign": "^4.0.1" |
11761 | } | 11764 | } |
11762 | }, | 11765 | }, |
11763 | "file-selector": { | ||
11764 | "version": "0.1.12", | ||
11765 | "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.12.tgz", | ||
11766 | "integrity": "sha512-Kx7RTzxyQipHuiqyZGf+Nz4vY9R1XGxuQl/hLoJwq+J4avk/9wxxgZyHKtbyIPJmbD4A66DWGYfyykWNpcYutQ==", | ||
11767 | "requires": { | ||
11768 | "tslib": "^1.9.0" | ||
11769 | } | ||
11770 | }, | ||
11771 | "file-uri-to-path": { | 11766 | "file-uri-to-path": { |
11772 | "version": "1.0.0", | 11767 | "version": "1.0.0", |
11773 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", | 11768 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", |
@@ -21987,13 +21982,12 @@ | |||
21987 | } | 21982 | } |
21988 | }, | 21983 | }, |
21989 | "react-dropzone": { | 21984 | "react-dropzone": { |
21990 | "version": "10.2.1", | 21985 | "version": "7.0.1", |
21991 | "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-10.2.1.tgz", | 21986 | "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-7.0.1.tgz", |
21992 | "integrity": "sha512-Me5nOu8hK9/Xyg5easpdfJ6SajwUquqYR/2YTdMotsCUgJ1pHIIwNsv0n+qcIno0tWR2V2rVQtj2r/hXYs2TnQ==", | 21987 | "integrity": "sha512-J4rbzhFZPVW7k7K9CVb0OcwSOJGLWa0y+0rvtB4rBLVkvq0agH/o3kPJ0DCkd6ZVzL2K1NFqIOvtQkwQKpmJBA==", |
21993 | "requires": { | 21988 | "requires": { |
21994 | "attr-accept": "^2.0.0", | 21989 | "attr-accept": "^1.1.3", |
21995 | "file-selector": "^0.1.12", | 21990 | "prop-types": "^15.6.2" |
21996 | "prop-types": "^15.7.2" | ||
21997 | } | 21991 | } |
21998 | }, | 21992 | }, |
21999 | "react-electron-web-view": { | 21993 | "react-electron-web-view": { |
diff --git a/package.json b/package.json index 39345c3e1..5e2297602 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": "3.1.0", | 103 | "react-confetti": "3.1.0", |
104 | "react-dom": "16.12.0", | 104 | "react-dom": "16.12.0", |
105 | "react-dropzone": "10.2.1", | 105 | "react-dropzone": "7.0.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 636d4fae3..83a05554b 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -89,16 +89,14 @@ 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} | ||
92 | multiple={multiple} | 93 | multiple={multiple} |
93 | accept="image/jpeg, image/png" | 94 | accept="image/jpeg, image/png" |
94 | > | 95 | > |
95 | {({ getRootProps, getInputProps }) => ( | 96 | <i className="mdi mdi-file-image" /> |
96 | <div {...getRootProps()} className={cssClasses}> | 97 | <p> |
97 | <i className="mdi mdi-file-image" /> | 98 | {textUpload} |
98 | <p>{textUpload}</p> | 99 | </p> |
99 | <input {...getInputProps()} /> | ||
100 | </div> | ||
101 | )} | ||
102 | </Dropzone> | 100 | </Dropzone> |
103 | )} | 101 | )} |
104 | </div> | 102 | </div> |