Merge branch 'master' into autoplay

This commit is contained in:
Jeremy Kauffman 2017-05-30 17:18:04 -04:00 committed by GitHub
commit c3eb921685
4 changed files with 10 additions and 6 deletions

View file

@ -16,8 +16,8 @@ Web UI version numbers should always match the corresponding version of LBRY App
*
### Fixed
*
*
* Closing modal dialogs was broken on some download and stream errors
* Discover landing page improperly showed loading error when it was loading correctly
### Deprecated
*

View file

@ -122,7 +122,7 @@ class FileActions extends React.Component {
<DropDownMenuItem key={1} onClick={() => openModal('confirmRemove')} label="Remove..." />
</DropDownMenu> : '' }
<Modal type="confirm" isOpen={modal == 'affirmPurchase'}
contentLabel="Confirm Purchase" onConfirmed={this.onAffirmPurchase.bind(this)} onAborted={this.props.closeModal}>
contentLabel="Confirm Purchase" onConfirmed={this.onAffirmPurchase.bind(this)} onAborted={closeModal}>
This will purchase <strong>{title}</strong> for <strong><FilePrice uri={uri} look="plain" /></strong> credits.
</Modal>
<Modal isOpen={modal == 'notEnoughCredits'} contentLabel="Not enough credits"

View file

@ -52,7 +52,7 @@ class VideoPlayButton extends React.Component {
className="video__play-button"
icon="icon-play"
onClick={this.onWatchClick.bind(this)} />
<Modal contentLabel="Not enough credits" isOpen={modal == 'notEnoughCredits'} onConfirmed={() => { this.closeModal() }}>
<Modal contentLabel="Not enough credits" isOpen={modal == 'notEnoughCredits'} onConfirmed={closeModal}>
You don't have enough LBRY credits to pay for this stream.
</Modal>
<Modal
@ -64,7 +64,7 @@ class VideoPlayButton extends React.Component {
This will purchase <strong>{title}</strong> for <strong><FilePrice uri={uri} look="plain" /></strong> credits.
</Modal>
<Modal
isOpen={modal == 'timedOut'} onConfirmed={() => { this.closeModal() }} contentLabel="Timed Out">
isOpen={modal == 'timedOut'} onConfirmed={closeModal} contentLabel="Timed Out">
Sorry, your download timed out :(
</Modal>
</div>);

View file

@ -33,6 +33,10 @@ class DiscoverPage extends React.Component{
featuredUris,
fetchingFeaturedUris,
} = this.props
const failedToLoad = !fetchingFeaturedUris && (
featuredUris === undefined ||
(featuredUris !== undefined && Object.keys(featuredUris).length === 0)
)
return (
<main>
@ -47,7 +51,7 @@ class DiscoverPage extends React.Component{
))
}
{
typeof featuredUris !== undefined &&
failedToLoad &&
<div className="empty">Failed to load landing content.</div>
}
</main>