Artur Paikin 7 年 前
コミット
672b26aa37
2 ファイル変更51 行追加8 行削除
  1. 36 6
      website/src/docs/dashboard.md
  2. 15 2
      website/src/docs/statusbar.md

+ 36 - 6
website/src/docs/dashboard.md

@@ -20,31 +20,43 @@ Dashboard is a universal UI plugin for Uppy:
 ```js
 ```js
 uppy.use(Dashboard, {
 uppy.use(Dashboard, {
   target: 'body',
   target: 'body',
-  inline: false,
+  metaFields: [],
   trigger: '#uppy-select-files',
   trigger: '#uppy-select-files',
-  plugins: [],
-  maxWidth: 750,
-  maxHeight: 550,
+  inline: false,
+  width: 750,
+  height: 550,
+  thumbnailWidth: 280,
+  defaultTabIcon: defaultTabIcon,
+  showLinkToFileUploadResult: true,
   showProgressDetails: false,
   showProgressDetails: false,
   hideUploadButton: false,
   hideUploadButton: false,
   hideProgressAfterFinish: false,
   hideProgressAfterFinish: false,
   note: null,
   note: null,
-  metaFields: [],
   closeModalOnClickOutside: false,
   closeModalOnClickOutside: false,
   disableStatusBar: false,
   disableStatusBar: false,
   disableInformer: false,
   disableInformer: false,
+  disableThumbnailGenerator: false,
+  disablePageScrollWhenModalOpen: true,
+  proudlyDisplayPoweredByUppy: true,
+  onRequestCloseModal: () => this.closeModal(),
   locale: {
   locale: {
     strings: {
     strings: {
       selectToUpload: 'Select files to upload',
       selectToUpload: 'Select files to upload',
       closeModal: 'Close Modal',
       closeModal: 'Close Modal',
       upload: 'Upload',
       upload: 'Upload',
-      importFrom: 'Import files from',
+      importFrom: 'Import from',
       dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',
       dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',
       dashboardTitle: 'Uppy Dashboard',
       dashboardTitle: 'Uppy Dashboard',
       copyLinkToClipboardSuccess: 'Link copied to clipboard.',
       copyLinkToClipboardSuccess: 'Link copied to clipboard.',
       copyLinkToClipboardFallback: 'Copy the URL below',
       copyLinkToClipboardFallback: 'Copy the URL below',
+      copyLink: 'Copy link',
       fileSource: 'File source',
       fileSource: 'File source',
       done: 'Done',
       done: 'Done',
+      name: 'Name',
+      removeFile: 'Remove file',
+      editFile: 'Edit file',
+      editing: 'Editing',
+      finishEditingFile: 'Finish editing file',
       localDisk: 'Local Disk',
       localDisk: 'Local Disk',
       myDevice: 'My Device',
       myDevice: 'My Device',
       dropPasteImport: 'Drop files here, paste, import from one of the locations above or',
       dropPasteImport: 'Drop files here, paste, import from one of the locations above or',
@@ -54,6 +66,18 @@ uppy.use(Dashboard, {
       numberOfSelectedFiles: 'Number of selected files',
       numberOfSelectedFiles: 'Number of selected files',
       uploadAllNewFiles: 'Upload all new files',
       uploadAllNewFiles: 'Upload all new files',
       emptyFolderAdded: 'No files were added from empty folder',
       emptyFolderAdded: 'No files were added from empty folder',
+      uploadComplete: 'Upload complete',
+      resumeUpload: 'Resume upload',
+      pauseUpload: 'Pause upload',
+      retryUpload: 'Retry upload',
+      uploadXFiles: {
+        0: 'Upload %{smart_count} file',
+        1: 'Upload %{smart_count} files'
+      },
+      uploadXNewFiles: {
+        0: 'Upload +%{smart_count} file',
+        1: 'Upload +%{smart_count} files'
+      },
       folderAdded: {
       folderAdded: {
         0: 'Added %{smart_count} file from %{folder}',
         0: 'Added %{smart_count} file from %{folder}',
         1: 'Added %{smart_count} files from %{folder}'
         1: 'Added %{smart_count} files from %{folder}'
@@ -140,6 +164,12 @@ Set to true to automatically close the modal when the user clicks outside of it.
 
 
 By default when Dashboard modal is open, it will disable page scrolling, so when you scroll a list of files in Uppy the website in the background stays still. Set to false to override this behaviour and leave page scrolling intact.
 By default when Dashboard modal is open, it will disable page scrolling, so when you scroll a list of files in Uppy the website in the background stays still. Set to false to override this behaviour and leave page scrolling intact.
 
 
+### `proudlyDisplayPoweredByUppy: true`
+
+Uppy is provided for the world for free by the [Transloadit team](https://transloadit.com). In return, we ask that you consider keeping tiny Uppy logo at the bottom of the Dashboard, so that more people learn about Uppy. 
+
+This is entirely optional of course, just set this option to false if you wish.
+
 ### `disableStatusBar: false`
 ### `disableStatusBar: false`
 
 
 Dashboard ships with the `StatusBar` plugin that shows upload progress and pause/resume/cancel buttons. If you want, you can disable the StatusBar to provide your custom solution.
 Dashboard ships with the `StatusBar` plugin that shows upload progress and pause/resume/cancel buttons. If you want, you can disable the StatusBar to provide your custom solution.

+ 15 - 2
website/src/docs/statusbar.md

@@ -21,7 +21,7 @@ uppy.use(StatusBar, {
   locale: {
   locale: {
     strings: {
     strings: {
       uploading: 'Uploading',
       uploading: 'Uploading',
-      uploadComplete: 'Upload complete',
+      complete: 'Complete',
       uploadFailed: 'Upload failed',
       uploadFailed: 'Upload failed',
       pleasePressRetry: 'Please press Retry to upload again',
       pleasePressRetry: 'Please press Retry to upload again',
       paused: 'Paused',
       paused: 'Paused',
@@ -32,6 +32,12 @@ uppy.use(StatusBar, {
       resumeUpload: 'Resume upload',
       resumeUpload: 'Resume upload',
       cancelUpload: 'Cancel upload',
       cancelUpload: 'Cancel upload',
       pauseUpload: 'Pause upload',
       pauseUpload: 'Pause upload',
+      filesUploadedOfTotal: {
+        0: '%{complete} of %{smart_count} file uploaded',
+        1: '%{complete} of %{smart_count} files uploaded'
+      },
+      dataUploadedOfTotal: '%{complete} of %{total}',
+      xTimeLeft: '%{time} left',
       uploadXFiles: {
       uploadXFiles: {
         0: 'Upload %{smart_count} file',
         0: 'Upload %{smart_count} file',
         1: 'Upload %{smart_count} files'
         1: 'Upload %{smart_count} files'
@@ -51,7 +57,14 @@ DOM element, CSS selector, or plugin to mount the StatusBar into.
 
 
 ### `hideAfterFinish: true`
 ### `hideAfterFinish: true`
 
 
-Hide StatusBar after upload finish
+Hide StatusBar after upload is complete.
+
+# `showProgressDetails: false`
+
+By default, progress in StatusBar is shown as simple percentage. If you’d like to also display remaining upload size and time, set this to `true`.
+
+`showProgressDetails: false`: Uploading: 45%
+`showProgressDetails: true`: Uploading: 45%・43 MB of 101 MB・8s left
 
 
 [FileInput]: https://github.com/transloadit/uppy/blob/master/src/plugins/FileInput.js
 [FileInput]: https://github.com/transloadit/uppy/blob/master/src/plugins/FileInput.js
 [DragDrop]: /docs/dragdrop
 [DragDrop]: /docs/dragdrop