Browse Source

Update docs

Artur Paikin 7 years ago
parent
commit
672b26aa37
2 changed files with 51 additions and 8 deletions
  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
 uppy.use(Dashboard, {
   target: 'body',
-  inline: false,
+  metaFields: [],
   trigger: '#uppy-select-files',
-  plugins: [],
-  maxWidth: 750,
-  maxHeight: 550,
+  inline: false,
+  width: 750,
+  height: 550,
+  thumbnailWidth: 280,
+  defaultTabIcon: defaultTabIcon,
+  showLinkToFileUploadResult: true,
   showProgressDetails: false,
   hideUploadButton: false,
   hideProgressAfterFinish: false,
   note: null,
-  metaFields: [],
   closeModalOnClickOutside: false,
   disableStatusBar: false,
   disableInformer: false,
+  disableThumbnailGenerator: false,
+  disablePageScrollWhenModalOpen: true,
+  proudlyDisplayPoweredByUppy: true,
+  onRequestCloseModal: () => this.closeModal(),
   locale: {
     strings: {
       selectToUpload: 'Select files to upload',
       closeModal: 'Close Modal',
       upload: 'Upload',
-      importFrom: 'Import files from',
+      importFrom: 'Import from',
       dashboardWindowTitle: 'Uppy Dashboard Window (Press escape to close)',
       dashboardTitle: 'Uppy Dashboard',
       copyLinkToClipboardSuccess: 'Link copied to clipboard.',
       copyLinkToClipboardFallback: 'Copy the URL below',
+      copyLink: 'Copy link',
       fileSource: 'File source',
       done: 'Done',
+      name: 'Name',
+      removeFile: 'Remove file',
+      editFile: 'Edit file',
+      editing: 'Editing',
+      finishEditingFile: 'Finish editing file',
       localDisk: 'Local Disk',
       myDevice: 'My Device',
       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',
       uploadAllNewFiles: 'Upload all new files',
       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: {
         0: 'Added %{smart_count} file 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.
 
+### `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`
 
 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: {
     strings: {
       uploading: 'Uploading',
-      uploadComplete: 'Upload complete',
+      complete: 'Complete',
       uploadFailed: 'Upload failed',
       pleasePressRetry: 'Please press Retry to upload again',
       paused: 'Paused',
@@ -32,6 +32,12 @@ uppy.use(StatusBar, {
       resumeUpload: 'Resume upload',
       cancelUpload: 'Cancel 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: {
         0: 'Upload %{smart_count} file',
         1: 'Upload %{smart_count} files'
@@ -51,7 +57,14 @@ DOM element, CSS selector, or plugin to mount the StatusBar into.
 
 ### `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
 [DragDrop]: /docs/dragdrop