On Discover and Show pages, hide Watch button for non-video content
This commit is contained in:
parent
3deb160822
commit
ef3e57be8a
2 changed files with 5 additions and 4 deletions
|
@ -105,7 +105,7 @@ var SearchResultRow = React.createClass({
|
|||
<div className="meta"><a href={'/?show=' + this.props.name}>lbry://{this.props.name}</a></div>
|
||||
<h3 style={searchRowTitleStyle}><a href={'/?show=' + this.props.name}>{this.props.title}</a></h3>
|
||||
<div>
|
||||
<WatchLink streamName={this.props.name} button="primary" />
|
||||
{this.props.mediaType == 'video' ? <WatchLink streamName={this.props.name} button="primary" /> : null}
|
||||
<DownloadLink streamName={this.props.name} button="text" />
|
||||
</div>
|
||||
<p style={searchRowDescriptionStyle}>{this.props.description}</p>
|
||||
|
@ -175,8 +175,8 @@ var FeaturedContentItem = React.createClass({
|
|||
|
||||
return (<div style={featuredContentItemContainerStyle}>
|
||||
<SearchResultRow name={this.props.name} title={this.state.title} imgUrl={this.state.metadata.thumbnail || '/img/default-thumb.svg'}
|
||||
description={this.state.metadata.description} cost={this.state.amount} nsfw={this.state.metadata.nsfw}
|
||||
available={this.state.available} />
|
||||
description={this.state.metadata.description} mediaType={lbry.getMediaType(this.state.metadata.content_type)}
|
||||
cost={this.state.amount} nsfw={this.state.metadata.nsfw} available={this.state.available} />
|
||||
</div>);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -24,6 +24,7 @@ var FormatItem = React.createClass({
|
|||
var language = claimInfo.language;
|
||||
var license = claimInfo.license;
|
||||
var fileContentType = (claimInfo.content_type || claimInfo['content-type']);
|
||||
var mediaType = lbry.getMediaType(fileContentType);
|
||||
var available = this.props.available;
|
||||
var amount = this.props.amount || 0.0;
|
||||
|
||||
|
@ -56,7 +57,7 @@ var FormatItem = React.createClass({
|
|||
</table>
|
||||
</section>
|
||||
<section>
|
||||
<WatchLink streamName={this.props.name} button="primary" />
|
||||
{mediaType == 'video' ? <WatchLink streamName={this.props.name} button="primary" /> : null}
|
||||
<DownloadLink streamName={this.props.name} button="alt" />
|
||||
</section>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue