Indicate files pending confirmation in FileTile
This commit is contained in:
parent
fe62548637
commit
eba0ac6842
1 changed files with 9 additions and 6 deletions
|
@ -113,20 +113,21 @@ export let FileTileStream = React.createClass({
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const metadata = this.props.metadata || {},
|
const metadata = this.props.metadata;
|
||||||
obscureNsfw = this.props.obscureNsfw && metadata.nsfw,
|
const isConfirmed = typeof metadata == 'object';
|
||||||
title = metadata.title ? metadata.title : ('lbry://' + this.props.name);
|
const title = isConfirmed ? metadata.title : this.props.name;
|
||||||
|
const obscureNsfw = this.props.obscureNsfw && isConfirmed && metadata.nsfw;
|
||||||
return (
|
return (
|
||||||
<section className={ 'file-tile card ' + (obscureNsfw ? 'card-obscured ' : '') } onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>
|
<section className={ 'file-tile card ' + (obscureNsfw ? 'card-obscured ' : '') } onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>
|
||||||
<div className={"row-fluid card-content file-tile__row"}>
|
<div className={"row-fluid card-content file-tile__row"}>
|
||||||
<div className="span3">
|
<div className="span3">
|
||||||
<a href={'/?show=' + this.props.name}><Thumbnail className="file-tile__thumbnail" src={metadata.thumbnail} alt={'Photo for ' + (title || this.props.name)} /></a>
|
<a href={'/?show=' + this.props.name}><Thumbnail className="file-tile__thumbnail" src={metadata.thumbnail} alt={`Photo for ${title}`} /></a>
|
||||||
</div>
|
</div>
|
||||||
<div className="span9">
|
<div className="span9">
|
||||||
{ !this.props.hidePrice
|
{ !this.props.hidePrice
|
||||||
? <FilePrice name={this.props.name} />
|
? <FilePrice name={this.props.name} />
|
||||||
: null}
|
: null}
|
||||||
<div className="meta"><a href={'/?show=' + this.props.name}>lbry://{this.props.name}</a></div>
|
<div className="meta"><a href={'/?show=' + this.props.name}>{isConfirmed ? metadata.title : ('lbry://' + this.props.name)}</a></div>
|
||||||
<h3 className="file-tile__title">
|
<h3 className="file-tile__title">
|
||||||
<a href={'/?show=' + this.props.name}>
|
<a href={'/?show=' + this.props.name}>
|
||||||
<TruncatedText lines={1}>
|
<TruncatedText lines={1}>
|
||||||
|
@ -137,7 +138,9 @@ export let FileTileStream = React.createClass({
|
||||||
<FileActions streamName={this.props.name} sdHash={this.props.sdHash} metadata={metadata} />
|
<FileActions streamName={this.props.name} sdHash={this.props.sdHash} metadata={metadata} />
|
||||||
<p className="file-tile__description">
|
<p className="file-tile__description">
|
||||||
<TruncatedText lines={3}>
|
<TruncatedText lines={3}>
|
||||||
{metadata.description}
|
{isConfirmed
|
||||||
|
? metadata.description
|
||||||
|
: <span className="empty">This file is pending confirmation.</span>}
|
||||||
</TruncatedText>
|
</TruncatedText>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue