1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 00:28:00 +02:00

Use overallProgress bar all the time

This commit is contained in:
Tim Daubenschütz 2015-11-20 15:14:25 +01:00
parent 96ad05cef4
commit 465bed94a2

View File

@ -41,18 +41,8 @@ let FileDragAndDropPreviewProgress = React.createClass({
render() {
const files = this.props.files.filter(displayValidProgressFilesFilter);
const style = !files.length ? { display: 'none' } : null;
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 (
<div style={{marginTop: '2em'}}>