diff --git a/flow-typed/publish.js b/flow-typed/publish.js index 3862c26ee..ca11a6a5d 100644 --- a/flow-typed/publish.js +++ b/flow-typed/publish.js @@ -11,6 +11,7 @@ declare type UpdatePublishFormData = { thumbnail_url?: string, uploadThumbnailStatus?: string, thumbnailPath?: string, + thumbnailError?: boolean, description?: string, language?: string, channel?: string, diff --git a/static/app-strings.json b/static/app-strings.json index 6faa0899a..fbb288205 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -310,6 +310,9 @@ "upload": "upload", "Uploading thumbnail": "Uploading thumbnail", "Please wait for thumbnail to finish uploading": "Please wait for thumbnail to finish uploading", + "A thumbnail is required. Please upload or provide an image URL above.": "A thumbnail is required. Please upload or provide an image URL above.", + "Thumbnail is invalid.": "Thumbnail is invalid.", + "Please reselect a file after changing the LBRY URL": "Please reselect a file after changing the LBRY URL", "API connection string": "API connection string", "Method": "Method", "Parameters": "Parameters", diff --git a/ui/component/publishForm/view.jsx b/ui/component/publishForm/view.jsx index bfefb3c54..7c3125eee 100644 --- a/ui/component/publishForm/view.jsx +++ b/ui/component/publishForm/view.jsx @@ -46,6 +46,7 @@ type Props = { editingURI: ?string, title: ?string, thumbnail: ?string, + thumbnailError: ?boolean, uploadThumbnailStatus: ?string, thumbnailPath: ?string, description: ?string, @@ -95,6 +96,7 @@ function PublishForm(props: Props) { // Detect upload type from query in URL const { thumbnail, + thumbnailError, name, editingURI, myClaimForUri, @@ -227,6 +229,7 @@ function PublishForm(props: Props) { thumbnail && !bidError && !emptyPostError && + !thumbnailError && !(uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS); const isOverwritingExistingClaim = !editingURI && myClaimForUri; diff --git a/ui/component/publishFormErrors/index.js b/ui/component/publishFormErrors/index.js index 651ed5991..28ca6c690 100644 --- a/ui/component/publishFormErrors/index.js +++ b/ui/component/publishFormErrors/index.js @@ -10,6 +10,7 @@ const select = (state) => ({ editingURI: makeSelectPublishFormValue('editingURI')(state), uploadThumbnailStatus: makeSelectPublishFormValue('uploadThumbnailStatus')(state), thumbnail: makeSelectPublishFormValue('thumbnail')(state), + thumbnailError: makeSelectPublishFormValue('thumbnailError')(state), isStillEditing: selectIsStillEditing(state), }); diff --git a/ui/component/publishFormErrors/view.jsx b/ui/component/publishFormErrors/view.jsx index 069629351..36fa4d355 100644 --- a/ui/component/publishFormErrors/view.jsx +++ b/ui/component/publishFormErrors/view.jsx @@ -13,6 +13,7 @@ type Props = { isStillEditing: boolean, uploadThumbnailStatus: string, thumbnail: string, + thumbnailError: boolean, waitForFile: boolean, }; @@ -27,6 +28,7 @@ function PublishFormErrors(props: Props) { isStillEditing, uploadThumbnailStatus, thumbnail, + thumbnailError, waitForFile, } = props; // These are extra help @@ -46,6 +48,7 @@ function PublishFormErrors(props: Props) { {!isUploadingThumbnail && !thumbnail && (