6d217dbc50
* Exclude default homepage data at compile time The youtuber IDs alone is pretty huge, and is unused in the `CUSTOM_HOMEPAGE=true` configuration. * Remove Desktop items and other cleanup - Moved constants out of the component. - Remove SIMPLE_SITE check. - Remove Desktop-only items * Sidebar: limit subscription and tag section ## Issue Too slow for huge lists ## Change Limit to 10 initially, and load everything on "Show more" * Fix makeSelectThumbnailForUri - Fix memo - Expose function to extract directly from claim if client already have it.
24 lines
1.2 KiB
JavaScript
24 lines
1.2 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectDownloadPathForUri, makeSelectStreamingUrlForUri } from 'redux/selectors/file_info';
|
|
import { makeSelectClaimForUri, selectThumbnailForUri, makeSelectContentTypeForUri } from 'redux/selectors/claims';
|
|
import * as SETTINGS from 'constants/settings';
|
|
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_MEDIA)(state);
|
|
return {
|
|
currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state),
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
thumbnail: selectThumbnailForUri(state, props.uri),
|
|
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);
|