1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-05 11:25:09 +01:00

Increase robustness by excluding meta data for pieces that have been loaned before actual launch

This commit is contained in:
Tim Daubenschütz 2015-09-22 13:37:31 +02:00
parent 878a716262
commit 4bbc4afd61

View File

@ -65,13 +65,17 @@ let IkonotvPieceContainer = React.createClass({
}, },
render() { render() {
if(this.state.piece && this.state.piece.title) { let furtherDetails = (
return ( <CollapsibleParagraph
<WalletPieceContainer title={getLangText('Further Details')}
piece={this.state.piece} show={true}
currentUser={this.state.currentUser} defaultExpanded={true}>
loadPiece={this.loadPiece} <span>{getLangText('This piece has been loaned before we started to collect further details.')}</span>
submitButtonType={IkonotvSubmitButton}> </CollapsibleParagraph>
);
if(this.state.piece.extra_data && Object.keys(this.state.piece.extra_data).length > 0 && this.state.piece.acl) {
furtherDetails = (
<CollapsibleParagraph <CollapsibleParagraph
title={getLangText('Further Details')} title={getLangText('Further Details')}
show={true} show={true}
@ -85,6 +89,17 @@ let IkonotvPieceContainer = React.createClass({
isInline={true} isInline={true}
disabled={!this.state.piece.acl.acl_edit} /> disabled={!this.state.piece.acl.acl_edit} />
</CollapsibleParagraph> </CollapsibleParagraph>
);
}
if(this.state.piece && this.state.piece.title) {
return (
<WalletPieceContainer
piece={this.state.piece}
currentUser={this.state.currentUser}
loadPiece={this.loadPiece}
submitButtonType={IkonotvSubmitButton}>
{furtherDetails}
</WalletPieceContainer> </WalletPieceContainer>
); );
} }