1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Only show results message when completed

This commit is contained in:
Brett Sun 2015-11-19 13:29:19 +01:00
parent 51f6bac5a2
commit 934e83d403

View File

@ -84,10 +84,14 @@ let RegisterPiece = React.createClass( {
},
getUploadedInfo() {
if (this.state.uploadInfos.length > 0 && this.state.testStarted) {
const resultMsg = this.state.testComplete ? (
<p>Please send these results by screenshot or by copying the values to <a href="mailto:brett@ascribe.io">brett@ascribe.io</a></p>
) : null;
if (this.state.testStarted) {
return (
<div style={{'backgroundColor': '#FFF'}}>
<h4>{this.state.testComplete? 'Results:' : 'Test in progress...'}</h4>
<h4>{this.state.testComplete ? 'Results:' : 'Test in progress...'}</h4>
For file of size: {this.state.testFileSize}
<ul>
{this.state.uploadInfos.map((uploadInfo) => {
@ -98,7 +102,7 @@ let RegisterPiece = React.createClass( {
}
})}
</ul>
<p>Please send these results by screenshot or by copying the values to <a href="mailto:brett@ascribe.io">brett@ascribe.io</a></p>
{resultMsg}
</div>
);
}