Sfoglia il codice sorgente

hide cancel button when individualCancellation is not available

//cc @goto-bus-stop
Artur Paikin 6 anni fa
parent
commit
b5a7051939

+ 1 - 1
packages/@uppy/dashboard/src/components/FileItem.js

@@ -106,7 +106,7 @@ module.exports = function FileItem (props) {
     { 'is-paused': isPaused },
     { 'is-error': error },
     { 'is-resumable': props.resumableUploads },
-    { 'is-bundled': props.bundledUpload }
+    { 'is-noIndividualCancellation': !props.individualCancellation }
   )
 
   const showRemoveButton = props.individualCancellation

+ 10 - 0
packages/@uppy/dashboard/src/style.scss

@@ -1022,6 +1022,16 @@ a.uppy-Dashboard-poweredBy {
   }
 }
 
+.uppy-DashboardItem.is-noIndividualCancellation {
+  .uppy-DashboardItem-progressIndicator {
+    cursor: default;
+  }
+
+  .cancel {
+    display: none;
+  }
+}
+
 .uppy-DashboardItem.is-processing .uppy-DashboardItem-progress {
   opacity: 0;
 }