PublishFormError: look at 'thumbnail' instead of 'thumbnail_url'
I believe the rest of the GUI is setting 'thumbnail'. 'thumbnail_url' is only populated right before publishing. So, the flag was always false -- we just never see the error on screen because the component is incorrectly hidden (fix for this is coming up next...)
This commit is contained in:
parent
d4fa45b257
commit
1911a5132b
2 changed files with 7 additions and 4 deletions
|
@ -9,7 +9,7 @@ const select = (state) => ({
|
|||
bidError: makeSelectPublishFormValue('bidError')(state),
|
||||
editingURI: makeSelectPublishFormValue('editingURI')(state),
|
||||
uploadThumbnailStatus: makeSelectPublishFormValue('uploadThumbnailStatus')(state),
|
||||
thumbnail: makeSelectPublishFormValue('thumbnail_url')(state),
|
||||
thumbnail: makeSelectPublishFormValue('thumbnail')(state),
|
||||
isStillEditing: selectIsStillEditing(state),
|
||||
});
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ function PublishFormErrors(props: Props) {
|
|||
} = props;
|
||||
// These are extra help
|
||||
// If there is an error it will be presented as an inline error as well
|
||||
|
||||
const isUploadingThumbnail = uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS;
|
||||
|
||||
return (
|
||||
<div className="error__text">
|
||||
{waitForFile && <div>{__('Choose a replay file, or select None')}</div>}
|
||||
|
@ -39,10 +42,10 @@ function PublishFormErrors(props: Props) {
|
|||
{!isNameValid(name, false) && INVALID_NAME_ERROR}
|
||||
{!bid && <div>{__('A deposit amount is required')}</div>}
|
||||
{bidError && <div>{__('Please check your deposit amount.')}</div>}
|
||||
{uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && (
|
||||
<div>{__('Please wait for thumbnail to finish uploading')}</div>
|
||||
{isUploadingThumbnail && <div>{__('Please wait for thumbnail to finish uploading')}</div>}
|
||||
{!isUploadingThumbnail && !thumbnail && (
|
||||
<div>{__('A thumbnail is required. Please upload or provide an image URL above.')}</div>
|
||||
)}
|
||||
{!thumbnail && <div>{__('A thumbnail is required. Please upload or provide an image URL above.')}</div>}
|
||||
{editingURI && !isStillEditing && !filePath && (
|
||||
<div>{__('Please reselect a file after changing the LBRY URL')}</div>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue