Merge pull request #2594 from lbryio/editBugfix
fixes two bugs on publish/edit page
This commit is contained in:
commit
1a18cf5827
3 changed files with 31 additions and 4 deletions
|
@ -13,6 +13,7 @@ import PublishPage from './view';
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
name: makeSelectPublishFormValue('name')(state),
|
name: makeSelectPublishFormValue('name')(state),
|
||||||
channel: makeSelectPublishFormValue('channel')(state),
|
channel: makeSelectPublishFormValue('channel')(state),
|
||||||
|
bid: makeSelectPublishFormValue('bid')(state),
|
||||||
uri: makeSelectPublishFormValue('uri')(state),
|
uri: makeSelectPublishFormValue('uri')(state),
|
||||||
isStillEditing: selectIsStillEditing(state),
|
isStillEditing: selectIsStillEditing(state),
|
||||||
isResolvingUri: selectIsResolvingPublishUris(state),
|
isResolvingUri: selectIsResolvingPublishUris(state),
|
||||||
|
|
|
@ -139,8 +139,8 @@ export const doUploadThumbnail = (filePath: string, thumbnailBuffer: Uint8Array)
|
||||||
};
|
};
|
||||||
|
|
||||||
export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileListItem) => (dispatch: Dispatch) => {
|
export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileListItem) => (dispatch: Dispatch) => {
|
||||||
const { name, amount, channel_name: channelName, value } = claim;
|
const { name, amount, value } = claim;
|
||||||
|
const channelName = (claim && claim.signing_channel && claim.signing_channel.normalized_name) || null;
|
||||||
const {
|
const {
|
||||||
author,
|
author,
|
||||||
description,
|
description,
|
||||||
|
@ -159,7 +159,6 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
|
||||||
|
|
||||||
const publishData: UpdatePublishFormData = {
|
const publishData: UpdatePublishFormData = {
|
||||||
name,
|
name,
|
||||||
channel: channelName,
|
|
||||||
bid: Number(amount),
|
bid: Number(amount),
|
||||||
contentIsFree: !fee.amount,
|
contentIsFree: !fee.amount,
|
||||||
author,
|
author,
|
||||||
|
@ -174,6 +173,10 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
|
||||||
nsfw: isClaimNsfw(claim),
|
nsfw: isClaimNsfw(claim),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (channelName) {
|
||||||
|
publishData['channel'] = channelName;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure custom liscence's are mapped properly
|
// Make sure custom liscence's are mapped properly
|
||||||
// If the license isn't one of the standard licenses, map the custom license and description/url
|
// If the license isn't one of the standard licenses, map the custom license and description/url
|
||||||
if (!CC_LICENSES.some(({ value }) => value === license)) {
|
if (!CC_LICENSES.some(({ value }) => value === license)) {
|
||||||
|
|
|
@ -335,5 +335,28 @@
|
||||||
"A name is required": "A name is required",
|
"A name is required": "A name is required",
|
||||||
"This file is downloaded.": "This file is downloaded.",
|
"This file is downloaded.": "This file is downloaded.",
|
||||||
"It looks like you haven't published anything to LBRY yet.": "It looks like you haven't published anything to LBRY yet.",
|
"It looks like you haven't published anything to LBRY yet.": "It looks like you haven't published anything to LBRY yet.",
|
||||||
"Publish something new": "Publish something new"
|
"Publish something new": "Publish something new",
|
||||||
|
"View it on spee.ch": "View it on spee.ch",
|
||||||
|
"New thumbnail": "New thumbnail",
|
||||||
|
"Add to your library": "Add to your library",
|
||||||
|
"Follow": "Follow",
|
||||||
|
"Claim sequence must be a number.": "Claim sequence must be a number.",
|
||||||
|
"A title is required": "A title is required",
|
||||||
|
"Clearing": "Clearing",
|
||||||
|
"A deposit amount is required": "A deposit amount is required",
|
||||||
|
"Deposit cannot be 0": "Deposit cannot be 0",
|
||||||
|
"Upload Thumbnail": "Upload Thumbnail",
|
||||||
|
"Confirm Thumbnail Upload": "Confirm Thumbnail Upload",
|
||||||
|
"Upload": "Upload",
|
||||||
|
"Are you sure you want to upload this thumbnail to spee.ch": "Are you sure you want to upload this thumbnail to spee.ch",
|
||||||
|
"Uploading thumbnail": "Uploading thumbnail",
|
||||||
|
"Please wait for thumbnail to finish uploading": "Please wait for thumbnail to finish uploading",
|
||||||
|
"API connection string": "API connection string",
|
||||||
|
"Method": "Method",
|
||||||
|
"Parameters": "Parameters",
|
||||||
|
"Error code": "Error code",
|
||||||
|
"Error message": "Error message",
|
||||||
|
"Error data": "Error data",
|
||||||
|
"Error": "Error",
|
||||||
|
"We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem.": "We're sorry that LBRY has encountered an error. This has been reported and we will investigate the problem."
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue