diff --git a/ui/component/publishFile/index.js b/ui/component/publishFile/index.js index c8ca526b8..30d533097 100644 --- a/ui/component/publishFile/index.js +++ b/ui/component/publishFile/index.js @@ -5,6 +5,7 @@ import { makeSelectPublishFormValue, doUpdatePublishForm, doToast, + doClearPublish, } from 'lbry-redux'; import PublishPage from './view'; @@ -17,6 +18,7 @@ const select = state => ({ }); const perform = dispatch => ({ + clearPublish: () => dispatch(doClearPublish()), updatePublishForm: value => dispatch(doUpdatePublishForm(value)), showToast: message => dispatch(doToast({ message, isError: true })), }); diff --git a/ui/component/publishFile/view.jsx b/ui/component/publishFile/view.jsx index 661746d30..e3aebc041 100644 --- a/ui/component/publishFile/view.jsx +++ b/ui/component/publishFile/view.jsx @@ -16,10 +16,22 @@ type Props = { disabled: boolean, publishing: boolean, showToast: string => void, + inProgress: boolean, + clearPublish: () => void, }; function PublishFile(props: Props) { - const { name, balance, filePath, isStillEditing, updatePublishForm, disabled, publishing } = props; + const { + name, + balance, + filePath, + isStillEditing, + updatePublishForm, + disabled, + publishing, + inProgress, + clearPublish, + } = props; let currentFile = ''; if (filePath) { @@ -79,7 +91,12 @@ function PublishFile(props: Props) { actionIconPadding={false} icon={ICONS.PUBLISH} disabled={disabled || balance === 0} - title={title} + title={ + + {title}{' '} + {inProgress &&