fb839b92ef
Blocking videos and images was too limiting, plus the system was intended to block spammy comments in the first place.
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
makeSelectClaimForUri,
|
|
makeSelectThumbnailForUri,
|
|
makeSelectContentTypeForUri,
|
|
makeSelectDownloadPathForUri,
|
|
makeSelectStreamingUrlForUri,
|
|
SETTINGS,
|
|
} from 'lbry-redux';
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
import { makeSelectFileRenderModeForUri, makeSelectFileExtensionForUri } from 'redux/selectors/content';
|
|
import FileRender from './view';
|
|
|
|
const select = (state, props) => {
|
|
const autoplay = props.embedded ? false : makeSelectClientSetting(SETTINGS.AUTOPLAY)(state);
|
|
return {
|
|
currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state),
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
thumbnail: makeSelectThumbnailForUri(props.uri)(state),
|
|
contentType: makeSelectContentTypeForUri(props.uri)(state),
|
|
downloadPath: makeSelectDownloadPathForUri(props.uri)(state),
|
|
fileExtension: makeSelectFileExtensionForUri(props.uri)(state),
|
|
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
|
|
renderMode: makeSelectFileRenderModeForUri(props.uri)(state),
|
|
autoplay: autoplay,
|
|
};
|
|
};
|
|
|
|
export default connect(select)(FileRender);
|