var removeIconColumnStyle = { fontSize: '1.3em', height: '120px', display: 'flex', alignItems: 'center', justifyContent: 'center', }, progressBarStyle = { height: '15px', width: '230px', backgroundColor: '#444', border: '2px solid #eee', display: 'inline-block', }, myFilesRowImgStyle = { maxHeight: '100px', display: 'block', marginLeft: 'auto', marginRight: 'auto', float: 'left' }; var MyFilesRow = React.createClass({ onRemoveClicked: function() { var alertText = 'Are you sure you\'d like to remove "' + this.props.title + '?" This will ' + (this.completed ? ' stop the download and ' : '') + 'permanently remove the file from your system.'; if (confirm(alertText)) { lbry.deleteFile(this.props.lbryUri); } }, onPauseResumeClicked: function() { if (this.props.stopped) { lbry.startFile(this.props.lbryUri); } else { lbry.stopFile(this.props.lbryUri); } }, render: function() { if (this.props.completed) { var pauseLink = null; var curProgressBarStyle = {display: 'none'}; } else { var pauseLink = { this.onPauseResumeClicked() }} />; var curProgressBarStyle = Object.assign({}, progressBarStyle); curProgressBarStyle.width = this.props.ratioLoaded * 230; curProgressBarStyle.borderRightWidth = 230 - (this.props.ratioLoaded * 230) + 2; } if (this.props.showWatchButton) { // 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 watchUri = "/?watch=" + this.props.lbryUri; } else { var watchUri = 'lbry://' + this.props.lbryUri; } var watchLink = ; } else { var watchLink = null; } return (