Redux #115
3 changed files with 12 additions and 8 deletions
|
@ -61,7 +61,6 @@ class FileCardStream extends React.Component {
|
||||||
isResolvingUri,
|
isResolvingUri,
|
||||||
navigate,
|
navigate,
|
||||||
hidePrice,
|
hidePrice,
|
||||||
claim,
|
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const uri = lbryuri.normalize(this.props.uri);
|
const uri = lbryuri.normalize(this.props.uri);
|
||||||
|
|
|
@ -42,7 +42,7 @@ const makeSelect = () => {
|
||||||
obscureNsfw: selectObscureNsfw(state),
|
obscureNsfw: selectObscureNsfw(state),
|
||||||
metadata: selectMetadataForUri(state, props),
|
metadata: selectMetadataForUri(state, props),
|
||||||
source: selectSourceForUri(state, props),
|
source: selectSourceForUri(state, props),
|
||||||
resolvingUri: selectResolvingUri(state, props),
|
isResolvingUri: selectResolvingUri(state, props),
|
||||||
})
|
})
|
||||||
|
|
||||||
return select
|
return select
|
||||||
|
|
|
@ -63,7 +63,9 @@ class FileTileStream extends React.Component {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
metadata,
|
metadata,
|
||||||
|
isResolvingUri,
|
||||||
navigate,
|
navigate,
|
||||||
|
hidePrice,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
const uri = lbryuri.normalize(this.props.uri);
|
const uri = lbryuri.normalize(this.props.uri);
|
||||||
|
@ -71,7 +73,14 @@ class FileTileStream extends React.Component {
|
||||||
const title = isConfirmed ? metadata.title : uri;
|
const title = isConfirmed ? metadata.title : uri;
|
||||||
const obscureNsfw = this.props.obscureNsfw && isConfirmed && metadata.nsfw;
|
const obscureNsfw = this.props.obscureNsfw && isConfirmed && metadata.nsfw;
|
||||||
|
|
||||||
console.debug(this.props)
|
let description = ""
|
||||||
|
if (isConfirmed) {
|
||||||
|
description = metadata.description
|
||||||
|
} else if (isResolvingUri) {
|
||||||
|
description = "Loading..."
|
||||||
|
} else {
|
||||||
|
description = <span className="empty">This file is pending confirmation</span>
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={ 'file-tile card ' + (obscureNsfw ? 'card--obscured ' : '') } onMouseEnter={this.handleMouseOver.bind(this)} onMouseLeave={this.handleMouseOut.bind(this)}>
|
<section className={ 'file-tile card ' + (obscureNsfw ? 'card--obscured ' : '') } onMouseEnter={this.handleMouseOver.bind(this)} onMouseLeave={this.handleMouseOut.bind(this)}>
|
||||||
|
@ -103,11 +112,7 @@ class FileTileStream extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
<div className="card__content">
|
<div className="card__content">
|
||||||
<p className="file-tile__description">
|
<p className="file-tile__description">
|
||||||
<TruncatedText lines={2}>
|
<TruncatedText lines={2}>{description}</TruncatedText>
|
||||||
{isConfirmed
|
|
||||||
? metadata.description
|
|
||||||
: <span className="empty">This file is pending confirmation.</span>}
|
|
||||||
</TruncatedText>
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue