diff --git a/frontend/src/css/file-uploader.css b/frontend/src/css/file-uploader.css index 657a5ba5c6..297d1fa6cb 100644 --- a/frontend/src/css/file-uploader.css +++ b/frontend/src/css/file-uploader.css @@ -73,11 +73,45 @@ color: #666666; } -.upload-operation .saving { - color: #ee8204; - word-wrap: break-word; -} - .disabled-link { color: #999999; } + +#upload-link-total-progress-container { + margin: 20px -32px 0; + border: 1px solid #eee; + border-width: 1px 0; + font-size: 14px; + height: 36px; +} + +.file-upload-item .upload-success-icon { + width: 16px; + height: 16px; + padding: 4px; + color: #fff; + background: #47b881; + border-radius: 100%; + font-size: 8px; + line-height: 1.1; + font-weight: bolder; +} + +.file-upload-item .upload-success-msg { + color: #47b881; +} + +.file-upload-item .upload-failure-icon { + width: 16px; + height: 16px; + padding: 4px; + color: #fff; + background: #ec4c47; + border-radius: 100%; + font-size: 8px; + text-align: center; +} + +.file-upload-item .upload-failure-msg { + color: #ec4c47; +} diff --git a/frontend/src/css/upload-link.css b/frontend/src/css/upload-link.css index 24376584d4..e5c47319a8 100644 --- a/frontend/src/css/upload-link.css +++ b/frontend/src/css/upload-link.css @@ -25,9 +25,6 @@ body { color: #f25041; font-size: 48px; } -#upload-link-panel .tip-list-item { - list-style: decimal inside none; -} #upload-link-drop-zone { background: rgba(255, 152, 0, 0.1); border: 2px dashed #ff9800; diff --git a/frontend/src/pages/upload-link/file-uploader.js b/frontend/src/pages/upload-link/file-uploader.js index 9302dad69f..97a2ce992f 100644 --- a/frontend/src/pages/upload-link/file-uploader.js +++ b/frontend/src/pages/upload-link/file-uploader.js @@ -302,8 +302,10 @@ class FileUploader extends React.Component { // start uploading onUploadStart = () => { + /* const message = gettext('File upload started'); toaster.notify(message); + */ }; onProgress = () => { @@ -421,10 +423,12 @@ class FileUploader extends React.Component { }; onComplete = () => { + /* if (!this.error) { const message = gettext('All files uploaded'); toaster.success(message); } + */ this.error = false; // reset it this.notifiedFolders = []; diff --git a/frontend/src/pages/upload-link/forbid-upload-list-item.js b/frontend/src/pages/upload-link/forbid-upload-list-item.js index bf39555e75..680e3d6e7e 100644 --- a/frontend/src/pages/upload-link/forbid-upload-list-item.js +++ b/frontend/src/pages/upload-link/forbid-upload-list-item.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Utils } from '../../utils/utils'; -import { gettext, maxUploadFileSize } from '../../utils/constants'; +import { gettext } from '../../utils/constants'; const propTypes = { file: PropTypes.object, @@ -10,15 +10,20 @@ const propTypes = { class ForbidUploadListItem extends React.Component { render() { - let { file } = this.props; - let msg = gettext('Please upload files less than {placeholder}').replace('{placeholder}', Utils.bytesToSize(maxUploadFileSize * 1000 * 1000)); + const { file } = this.props; return (
{gettext('File size should be smaller than {max_size_placeholder}.').replace('{max_size_placeholder}', Utils.bytesToSize(maxUploadFileSize * 1000 * 1000))}
}{gettext('Drag and drop files or folders here.')}
diff --git a/frontend/src/pages/upload-link/upload-list-item.js b/frontend/src/pages/upload-link/upload-list-item.js index eba59fea85..621fe29e42 100644 --- a/frontend/src/pages/upload-link/upload-list-item.js +++ b/frontend/src/pages/upload-link/upload-list-item.js @@ -105,17 +105,37 @@ class UploadListItem extends React.Component { )} } - {(resumableFile.size < (100 * 1000 * 1000)) && -{gettext('Waiting...')}
} + {progress > 0 &&{`${gettext('Uploading...')} ${progress}%`}
} + > + )} + {this.state.uploadState === UPLOAD_ISSAVING && ( +{gettext('Saving...')}
+ )} + > + )} } + {this.state.uploadState === UPLOAD_UPLOADED && ( +{filesFailedMsg}
: +{gettext('All files uploaded')}
+ } + > + )} + {uploadFileList.length > 0 && {filesUploadedMsg}} +{gettext('name')} | +{gettext('name')} | {gettext('size')} | -{gettext('progress')} | +{gettext('progress')} | {gettext('state')} |
---|