Преглед на файлове

fix “Add Files” when no acquire plugins are used

Artur Paikin преди 6 години
родител
ревизия
c55d77ebe0
променени са 2 файла, в които са добавени 11 реда и са изтрити 6 реда
  1. 7 4
      packages/@uppy/dashboard/src/components/AddFiles.js
  2. 4 2
      packages/@uppy/dashboard/src/style.scss

+ 7 - 4
packages/@uppy/dashboard/src/components/AddFiles.js

@@ -19,18 +19,21 @@ class AddFiles extends Component {
   }
   }
 
 
   render () {
   render () {
-    const isHidden = Object.keys(this.props.files).length === 0
+    // const isHidden = Object.keys(this.props.files).length === 0
     const hasAcquirers = this.props.acquirers.length !== 0
     const hasAcquirers = this.props.acquirers.length !== 0
 
 
     if (!hasAcquirers) {
     if (!hasAcquirers) {
       return (
       return (
-        <div class="uppy-DashboardTabs" aria-hidden={isHidden}>
-          <div class="uppy-DashboardTabs-title">
+        <div class="uppy-DashboarAddFiles">
+          <div class="uppy-DashboardTabs">
             <ActionBrowseTagline
             <ActionBrowseTagline
               acquirers={this.props.acquirers}
               acquirers={this.props.acquirers}
               handleInputChange={this.props.handleInputChange}
               handleInputChange={this.props.handleInputChange}
               i18n={this.props.i18n}
               i18n={this.props.i18n}
-              i18nArray={this.props.i18nArray} />
+              i18nArray={this.props.i18nArray}
+              allowedFileTypes={this.props.allowedFileTypes}
+              maxNumberOfFiles={this.props.maxNumberOfFiles}
+            />
           </div>
           </div>
         </div>
         </div>
       )
       )

+ 4 - 2
packages/@uppy/dashboard/src/style.scss

@@ -231,6 +231,7 @@
   max-height: 300px;
   max-height: 300px;
   overflow-x: auto;
   overflow-x: auto;
   -webkit-overflow-scrolling: touch;
   -webkit-overflow-scrolling: touch;
+  margin-top: 10px;
 
 
   .uppy-size--md & {
   .uppy-size--md & {
     flex-direction: row;
     flex-direction: row;
@@ -238,6 +239,7 @@
     justify-content: center;
     justify-content: center;
     max-width: 600px;
     max-width: 600px;
     overflow-x: initial;
     overflow-x: initial;
+    margin-top: 30px;
   }
   }
 }
 }
 
 
@@ -544,13 +546,13 @@
   font-weight: 400;
   font-weight: 400;
   color: $color-asphalt-gray;
   color: $color-asphalt-gray;
   margin: auto;
   margin: auto;
-  margin-bottom: 10px;
+  // margin-bottom: 10px;
   padding: 0 15px;
   padding: 0 15px;
 
 
   .uppy-size--md & {
   .uppy-size--md & {
     max-width: 400px;
     max-width: 400px;
     font-size: 27px;
     font-size: 27px;
-    margin-bottom: 30px;
+    // margin-bottom: 30px;
   }
   }
 }
 }