Make title a link to show page, make watch link not use lory://

This commit is contained in:
Jonas Whidden 2016-07-17 17:16:57 -05:00
parent 151cb22684
commit 8890a0cb8c
2 changed files with 3 additions and 7 deletions

View file

@ -87,12 +87,8 @@ var WatchLink = React.createClass({
}, },
render: function() { render: function() {
// No support for lbry:// URLs in Windows or on Chrome yet
if (/windows|win32/i.test(navigator.userAgent) || (window.chrome && window.navigator.vendor == "Google Inc.")) {
var uri = "/?watch=" + this.props.streamName; var uri = "/?watch=" + this.props.streamName;
} else {
var uri = 'lbry://' + this.props.streamName;
}
return <Link button={this.props.button} hidden={this.props.hidden} style={this.props.style} return <Link button={this.props.button} hidden={this.props.hidden} style={this.props.style}
href={uri} label={this.props.label} icon={this.props.icon} onClick={this.onClick} />; href={uri} label={this.props.label} icon={this.props.icon} onClick={this.onClick} />;
} }

View file

@ -191,7 +191,7 @@ var FeaturedContentItem = React.createClass({
<img src={metadata.thumbnail} alt={'Photo for ' + this.state.title} style={thumbStyle} /> <img src={metadata.thumbnail} alt={'Photo for ' + this.state.title} style={thumbStyle} />
</div> </div>
<div className="span8"> <div className="span8">
<h4 style={featuredContentHeaderStyle}>{this.state.title}</h4> <h4 style={featuredContentHeaderStyle}><a href={'/?show=' + this.props.name}>{this.state.title}</a></h4>
<div style={featuredContentSubheaderStyle}> <div style={featuredContentSubheaderStyle}>
<div style={featuredContentItemCostStyle}><CreditAmount amount={this.state.amount} isEstimate={true}/></div> <div style={featuredContentItemCostStyle}><CreditAmount amount={this.state.amount} isEstimate={true}/></div>
<WatchLink streamName={this.props.name} /> <WatchLink streamName={this.props.name} />