Quellcode durchsuchen

Update AddFiles.jsx (#4894)

Uncouple the native camera and video buttons from the option disableLocalFiles to solve issue #4430
Jake McAllister vor 1 Jahr
Ursprung
Commit
93c5e0a1c8
1 geänderte Dateien mit 3 neuen und 5 gelöschten Zeilen
  1. 3 5
      packages/@uppy/dashboard/src/components/AddFiles.jsx

+ 3 - 5
packages/@uppy/dashboard/src/components/AddFiles.jsx

@@ -241,11 +241,9 @@ class AddFiles extends Component {
 
     const myDeviceKey = 'myDevice'
 
-    if (!disableLocalFiles) {
-      list.push({ key: myDeviceKey, elements: this.renderMyDeviceAcquirer() })
-      if (showNativePhotoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderPhotoCamera() })
-      if (showNativeVideoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderVideoCamera() })
-    }
+    if (!disableLocalFiles) list.push({ key: myDeviceKey, elements: this.renderMyDeviceAcquirer() })
+    if (showNativePhotoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderPhotoCamera() })
+    if (showNativeVideoCameraButton) list.push({ key: 'nativePhotoCameraButton', elements: this.renderVideoCamera() })
     list.push(...acquirers.map((acquirer) => ({ key: acquirer.id, elements: this.renderAcquirer(acquirer) })))
 
     // doesn't make sense to show only a lonely "My Device"