浏览代码

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 () {
-    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
 
     if (!hasAcquirers) {
       return (
-        <div class="uppy-DashboardTabs" aria-hidden={isHidden}>
-          <div class="uppy-DashboardTabs-title">
+        <div class="uppy-DashboarAddFiles">
+          <div class="uppy-DashboardTabs">
             <ActionBrowseTagline
               acquirers={this.props.acquirers}
               handleInputChange={this.props.handleInputChange}
               i18n={this.props.i18n}
-              i18nArray={this.props.i18nArray} />
+              i18nArray={this.props.i18nArray}
+              allowedFileTypes={this.props.allowedFileTypes}
+              maxNumberOfFiles={this.props.maxNumberOfFiles}
+            />
           </div>
         </div>
       )

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

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