Make My Files page use new WatchLink component
This commit is contained in:
parent
db76714801
commit
1894f833a5
1 changed files with 3 additions and 10 deletions
|
@ -52,16 +52,9 @@ var MyFilesRow = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.showWatchButton) {
|
if (this.props.showWatchButton) {
|
||||||
// No support for lbry:// URLs in Windows or on Chrome yet
|
var watchButton = <WatchLink streamName={this.props.lbryUri} button='primary' />
|
||||||
if (/windows|win32/i.test(navigator.userAgent) || (window.chrome && window.navigator.vendor == "Google Inc.")) {
|
|
||||||
var watchUri = "/?watch=" + this.props.lbryUri;
|
|
||||||
} else {
|
} else {
|
||||||
var watchUri = 'lbry://' + this.props.lbryUri;
|
var watchButton = null;
|
||||||
}
|
|
||||||
|
|
||||||
var watchLink = <Link href={watchUri} label="Watch" icon="icon-play" button="primary" />;
|
|
||||||
} else {
|
|
||||||
var watchLink = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -75,7 +68,7 @@ var MyFilesRow = React.createClass({
|
||||||
{ ' ' }
|
{ ' ' }
|
||||||
{this.props.completed ? 'Download complete' : (parseInt(this.props.ratioLoaded * 100) + '%')}
|
{this.props.completed ? 'Download complete' : (parseInt(this.props.ratioLoaded * 100) + '%')}
|
||||||
<div>{ pauseLink }</div>
|
<div>{ pauseLink }</div>
|
||||||
<div>{ watchLink }</div>
|
<div>{ watchButton }</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="span1" style={removeIconColumnStyle}>
|
<div className="span1" style={removeIconColumnStyle}>
|
||||||
<Link icon="icon-close" title="Remove file" onClick={() => { this.onRemoveClicked() } } /><br />
|
<Link icon="icon-close" title="Remove file" onClick={() => { this.onRemoveClicked() } } /><br />
|
||||||
|
|
Loading…
Reference in a new issue