fixes two bugs on edit page \

channel selector was not being populated \
bid amount was not editable
This commit is contained in:
jessop 2019-07-01 12:29:12 -04:00
parent d1b4af1367
commit 3b1ca0ddfd
3 changed files with 31 additions and 4 deletions

View file

@ -13,6 +13,7 @@ import PublishPage from './view';
const select = state => ({
name: makeSelectPublishFormValue('name')(state),
channel: makeSelectPublishFormValue('channel')(state),
bid: makeSelectPublishFormValue('bid')(state),
uri: makeSelectPublishFormValue('uri')(state),
isStillEditing: selectIsStillEditing(state),
isResolvingUri: selectIsResolvingPublishUris(state),

View file

@ -139,8 +139,8 @@ export const doUploadThumbnail = (filePath: string, thumbnailBuffer: Uint8Array)
};
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 {
author,
description,
@ -159,7 +159,6 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
const publishData: UpdatePublishFormData = {
name,
channel: channelName,
bid: Number(amount),
contentIsFree: !fee.amount,
author,
@ -174,6 +173,10 @@ export const doPrepareEdit = (claim: StreamClaim, uri: string, fileInfo: FileLis
nsfw: isClaimNsfw(claim),
};
if (channelName) {
publishData['channel'] = channelName;
}
// 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 (!CC_LICENSES.some(({ value }) => value === license)) {

View file

@ -335,5 +335,28 @@
"A name is required": "A name is required",
"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.",
"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."
}