mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
This requires an accompanying change in lbry-redux. Search for "SETTINGS.ENABLE_PUBLISH_PREVIEW" in the commit message to find the commit. In Edit Mode, the preview will not appear. Not sure if it's needed, plus there are more things to handle in Edit mode (e.g. which items are changed)
42 lines
1.6 KiB
JavaScript
42 lines
1.6 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
doResolveUri,
|
|
selectPublishFormValues,
|
|
selectIsStillEditing,
|
|
selectMyClaimForUri,
|
|
selectIsResolvingPublishUris,
|
|
selectTakeOverAmount,
|
|
doResetThumbnailStatus,
|
|
doClearPublish,
|
|
doUpdatePublishForm,
|
|
doPrepareEdit,
|
|
doCheckPublishNameAvailability,
|
|
} from 'lbry-redux';
|
|
import { doPublishDesktop } from 'redux/actions/publish';
|
|
import { selectUnclaimedRewardValue } from 'redux/selectors/rewards';
|
|
import PublishPage from './view';
|
|
|
|
const select = state => ({
|
|
...selectPublishFormValues(state),
|
|
// The winning claim for a short lbry uri
|
|
amountNeededForTakeover: selectTakeOverAmount(state),
|
|
// My previously published claims under this short lbry uri
|
|
myClaimForUri: selectMyClaimForUri(state),
|
|
// If I clicked the "edit" button, have I changed the uri?
|
|
// Need this to make it easier to find the source on previously published content
|
|
isStillEditing: selectIsStillEditing(state),
|
|
isResolvingUri: selectIsResolvingPublishUris(state),
|
|
totalRewardValue: selectUnclaimedRewardValue(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
updatePublishForm: value => dispatch(doUpdatePublishForm(value)),
|
|
clearPublish: () => dispatch(doClearPublish()),
|
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
|
publish: (filePath, preview) => dispatch(doPublishDesktop(filePath, preview)),
|
|
prepareEdit: (claim, uri) => dispatch(doPrepareEdit(claim, uri)),
|
|
resetThumbnailStatus: () => dispatch(doResetThumbnailStatus()),
|
|
checkAvailability: name => dispatch(doCheckPublishNameAvailability(name)),
|
|
});
|
|
|
|
export default connect(select, perform)(PublishPage);
|