Merge pull request #153 from lbryio/fix-uris-file-tile

Fix display of LBRY URIs in FileTile
This commit is contained in:
alexliebowitz 2017-02-01 03:43:12 -05:00 committed by GitHub
commit ea1a10860e

View file

@ -115,7 +115,7 @@ export let FileTileStream = React.createClass({
const metadata = this.props.metadata; const metadata = this.props.metadata;
const isConfirmed = typeof metadata == 'object'; const isConfirmed = typeof metadata == 'object';
const title = isConfirmed ? metadata.title : this.props.name; const title = isConfirmed ? metadata.title : ('lbry://' + this.props.name);
const obscureNsfw = this.props.obscureNsfw && isConfirmed && metadata.nsfw; 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}>
@ -127,7 +127,7 @@ export let FileTileStream = React.createClass({
{ !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}>{isConfirmed ? metadata.title : ('lbry://' + this.props.name)}</a></div> <div className="meta"><a href={'/?show=' + this.props.name}>{'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}>