diff --git a/js/component/file-actions.js b/js/component/file-actions.js index 0ad8ba04d..053aae535 100644 --- a/js/component/file-actions.js +++ b/js/component/file-actions.js @@ -176,7 +176,7 @@ let FileActionsRow = React.createClass({ const progress = this.state.fileInfo ? this.state.fileInfo.written_bytes / this.state.fileInfo.total_bytes * 100 : 0, label = this.state.fileInfo ? progress.toFixed(0) + '% complete' : 'Connecting...', - labelWithIcon = {label}; + labelWithIcon = {label}; linkBlock = (
@@ -185,7 +185,7 @@ let FileActionsRow = React.createClass({
); } else { - linkBlock = ; + linkBlock = ; } return ( @@ -263,7 +263,7 @@ export let FileActions = React.createClass({
This file is not currently available.
+ body="The content on LBRY is hosted by its users. It appears there are no users connected that have this file at the moment." />
diff --git a/js/component/link.js b/js/component/link.js index d19e0b46c..d1a920346 100644 --- a/js/component/link.js +++ b/js/component/link.js @@ -28,26 +28,27 @@ export let Link = React.createClass({ /* The way the class name is generated here is a mess -- refactor */ const className = (this.props.className || '') + - (this.props.button ? ' button-block button-' + this.props.button : '') + + (!this.props.className && !this.props.button ? 'button-block button-text' : '') + // Non-button links get the same look as text buttons + (this.props.button ? 'button-block button-' + this.props.button : '') + (this.props.disabled ? ' disabled' : ''); let content; if (this.props.children) { // Custom content content = this.props.children; } else { - content = [ - 'icon' in this.props ? : null, - {this.props.label}, - 'badge' in this.props ? {this.props.badge} : null, - ]; + content = ( + + {'icon' in this.props ? : null} + {{this.props.label}} + {'badge' in this.props ? {this.props.badge} : null} + + ); } return ( - {('button' in this.props) && this.props.button != 'text' - ? {content} - : content} + {content} ); } diff --git a/js/lbry.js b/js/lbry.js index 96965ec99..2f804e365 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -5,6 +5,7 @@ var lbry = { rootPath: '.', daemonConnectionString: 'http://localhost:5279/lbryapi', webUiUri: 'http://localhost:5279', + peerListTimeout: 6000, colors: { primary: '#155B4A' }, @@ -190,7 +191,18 @@ lbry.getTotalCost = function(name, size, callback) { } lbry.getPeersForBlobHash = function(blobHash, callback) { - lbry.call('get_peers_for_hash', { blob_hash: blobHash }, callback) + let timedOut = false; + const timeout = setTimeout(() => { + timedOut = true; + callback([]); + }, lbry.peerListTimeout); + + lbry.call('peer_list', { blob_hash: blobHash }, function(peers) { + if (!timedOut) { + clearTimeout(timeout); + callback(peers); + } + }); } lbry.getCostInfoForName = function(name, callback) { diff --git a/scss/_global.scss b/scss/_global.scss index 4fc770831..5997470d7 100644 --- a/scss/_global.scss +++ b/scss/_global.scss @@ -3,6 +3,7 @@ $spacing-vertical: 24px; $padding-button: 12px; +$padding-text-link: 4px; $color-primary: #155B4A; $color-light-alt: hsl(hue($color-primary), 15, 85); diff --git a/scss/_gui.scss b/scss/_gui.scss index 5d7685037..be4fefcbf 100644 --- a/scss/_gui.scss +++ b/scss/_gui.scss @@ -198,6 +198,10 @@ input[type="text"], input[type="search"] { @include text-link(); display: inline-block; + + .button__content { + margin: 0 $padding-text-link; + } } .button-text-help { diff --git a/scss/component/_file-actions.scss b/scss/component/_file-actions.scss index 6b3e934ee..4eda16b51 100644 --- a/scss/component/_file-actions.scss +++ b/scss/component/_file-actions.scss @@ -8,6 +8,12 @@ $color-download: #444; min-height: $height-button; } +.file-actions__download-status-bar, .file-actions__download-status-bar-overlay { + .button__content { + margin: 0 $padding-text-link; + } +} + .file-actions__download-status-bar { position: relative; diff --git a/scss/component/_menu.scss b/scss/component/_menu.scss index d46926bba..68ceb5d7d 100644 --- a/scss/component/_menu.scss +++ b/scss/component/_menu.scss @@ -10,6 +10,7 @@ $border-radius-menu: 2px; border-radius: $border-radius-menu; padding-top: $spacing-vertical / 2; padding-bottom: $spacing-vertical / 2; + z-index: 1; } .menu__menu-item {