diff --git a/static/app-strings.json b/static/app-strings.json index 3b613400d..390d654ff 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1988,5 +1988,11 @@ "Chat": "Chat", "Tipped": "Tipped", "Fromage": "Fromage", + "added to": "added to", + "Item %action% Watch Later": "Item %action% Watch Later", + "In Watch Later": "In Watch Later", + "Item added to Watch Later": "Item added to Watch Later", + "Your publish is being confirmed and will be live soon": "Your publish is being confirmed and will be live soon", + "Clear Edits": "Clear Edits", "--end--": "--end--" } diff --git a/ui/component/collectionEdit/index.js b/ui/component/collectionEdit/index.js index 74201b09c..1ff4e0d7c 100644 --- a/ui/component/collectionEdit/index.js +++ b/ui/component/collectionEdit/index.js @@ -11,11 +11,11 @@ import { selectUpdatingCollection, selectCreateCollectionError, selectBalance, - doClearCollectionErrors, selectCreatingCollection, makeSelectCollectionForId, makeSelectUrlsForCollectionId, makeSelectClaimIdsForCollectionId, + ACTIONS as LBRY_REDUX_ACTIONS, } from 'lbry-redux'; import { doOpenModal } from 'redux/actions/app'; @@ -47,7 +47,7 @@ const perform = (dispatch) => ({ openModal: (modal, props) => dispatch(doOpenModal(modal, props)), publishCollectionUpdate: (params) => dispatch(doCollectionPublishUpdate(params)), publishCollection: (params, collectionId) => dispatch(doCollectionPublish(params, collectionId)), - clearCollectionErrors: () => dispatch(doClearCollectionErrors()), + clearCollectionErrors: () => dispatch({ type: LBRY_REDUX_ACTIONS.CLEAR_COLLECTION_ERRORS }), }); export default connect(select, perform)(CollectionPage); diff --git a/ui/component/collectionEdit/view.jsx b/ui/component/collectionEdit/view.jsx index 00665ac6e..528ebf4a8 100644 --- a/ui/component/collectionEdit/view.jsx +++ b/ui/component/collectionEdit/view.jsx @@ -21,6 +21,7 @@ import { INVALID_NAME_ERROR } from 'constants/claim'; import SUPPORTED_LANGUAGES from 'constants/supported_languages'; import * as PAGES from 'constants/pages'; import analytics from 'analytics'; +import * as ICONS from '../../constants/icons'; const LANG_NONE = 'none'; const MAX_TAG_SELECT = 5; @@ -86,6 +87,7 @@ function CollectionForm(props: Props) { collection, collectionUrls, collectionClaimIds, + clearCollectionErrors, } = props; const activeChannelName = activeChannelClaim && activeChannelClaim.name; let prefix = IS_WEB ? `${DOMAIN}/` : 'lbry://'; @@ -163,6 +165,7 @@ function CollectionForm(props: Props) { React.useEffect(() => { const collectionClaimIds = JSON.parse(collectionClaimIdsString); setParams({ ...params, claims: collectionClaimIds }); + clearCollectionErrors(); }, [collectionClaimIdsString, setParams]); function handleLanguageChange(index, code) { @@ -228,12 +231,16 @@ function CollectionForm(props: Props) { setParams({ ...params, channel_id: activeChannelId }); } }, [activeChannelId, incognito, setParams]); + const itemError = !params.claims.length ? __('Cannot publish empty list') : ''; const submitError = nameError || bidError || itemError || updateError || createError; return ( <>