add no thumbnail fallback and make sure .zips aren't playable

This commit is contained in:
Sean Yesmunt 2018-06-13 16:47:22 -04:00
parent 422dd25949
commit 961f1cf2fd
4 changed files with 16 additions and 11 deletions

View file

@ -1,13 +1,19 @@
import React from 'react';
import { connect } from 'react-redux';
import { doDownloadUpgrade, doSkipUpgrade } from 'redux/actions/app';
import { doDownloadUpgrade, doSkipUpgrade, doHideNotification } from 'redux/actions/app';
import ModalUpgrade from './view';
const select = state => ({});
const perform = dispatch => ({
downloadUpgrade: () => dispatch(doDownloadUpgrade()),
skipUpgrade: () => dispatch(doSkipUpgrade()),
skipUpgrade: () => {
dispatch(doHideNotification());
dispatch(doSkipUpgrade());
},
});
export default connect(select, perform)(ModalUpgrade);
export default connect(
select,
perform
)(ModalUpgrade);

View file

@ -24,7 +24,11 @@ class ModalUpgrade extends React.PureComponent {
</p>
<p className="meta text-center">
{__('Want to know what has changed?')} See the{' '}
<Button label={__('release notes')} href="https://github.com/lbryio/lbry-app/releases" />.
<Button
button="link"
label={__('release notes')}
href="https://github.com/lbryio/lbry-app/releases"
/>.
</p>
</Modal>
);

View file

@ -116,7 +116,7 @@ class FilePage extends React.Component<Props> {
const { height, channel_name: channelName, value } = claim;
const mediaType = Lbry.getMediaType(contentType);
const isPlayable =
Object.values(player.mime).indexOf(contentType) !== -1 || mediaType === 'audio';
Object.values(player.mime).indexOf(mediaType) !== -1 || mediaType === 'audio';
const channelClaimId =
value && value.publisherSignature && value.publisherSignature.certificateId;
let subscriptionUri;
@ -160,11 +160,7 @@ class FilePage extends React.Component<Props> {
'content__empty--nsfw': shouldObscureThumbnail,
})}
>
<div className="card__media-text">
{__('This content is not playable.')}
<br />
{__('To view this, click the download link below.')}
</div>
<div className="card__media-text">{__('This content is not playable.')}</div>
</div>
))}
<div className="card__content">

View file

@ -114,7 +114,6 @@ reducers[ACTIONS.SKIP_UPGRADE] = state => {
return Object.assign({}, state, {
isUpgradeSkipped: true,
modal: null,
});
};