mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Use overallProgress bar all the time
This commit is contained in:
parent
96ad05cef4
commit
465bed94a2
@ -41,18 +41,8 @@ let FileDragAndDropPreviewProgress = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const files = this.props.files.filter(displayValidProgressFilesFilter);
|
const files = this.props.files.filter(displayValidProgressFilesFilter);
|
||||||
|
const style = !files.length ? { display: 'none' } : null;
|
||||||
let overallProgress = this.calcOverallProgress();
|
let overallProgress = this.calcOverallProgress();
|
||||||
let overallFileSize = this.calcOverallFileSize();
|
|
||||||
let style = {
|
|
||||||
visibility: 'hidden'
|
|
||||||
};
|
|
||||||
|
|
||||||
// only visible if overallProgress is over zero
|
|
||||||
// or the overallFileSize is greater than 10MB
|
|
||||||
// or the user is only uploading one file
|
|
||||||
if(overallProgress !== 0 && overallFileSize > 10000000 || files.length === 1) {
|
|
||||||
style.visibility = 'visible';
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div style={{marginTop: '2em'}}>
|
<div style={{marginTop: '2em'}}>
|
||||||
|
Loading…
Reference in New Issue
Block a user