channel update submitting state

This commit is contained in:
jessop 2020-06-22 11:19:55 -04:00
parent e065c81f88
commit e3a5d71e34
5 changed files with 17 additions and 6 deletions

View file

@ -135,7 +135,7 @@
"imagesloaded": "^4.1.4",
"json-loader": "^0.5.4",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#d148806bbdc74fb194c67942e3a401a0724a2738",
"lbry-redux": "lbryio/lbry-redux#e9d03635883fbe87f1835fca0bf28b402cca6696",
"lbryinc": "lbryio/lbryinc#72eee35f5181940eb4a468a27ddb2a2a4e362fb0",
"lint-staged": "^7.0.2",
"localforage": "^1.7.1",

View file

@ -1239,5 +1239,8 @@
"Create a New Channel": "Create a New Channel",
"Thumbnail source": "Thumbnail source",
"Cover source": "Cover source",
"Your changes will be live in a few minutes": "Your changes will be live in a few minutes"
"Your changes will be live in a few minutes": "Your changes will be live in a few minutes",
"Submitting": "Submitting",
"Thumbnail Recommended ratio is 1:1": "Thumbnail Recommended ratio is 1:1",
"Cover Recommended ratio is 6.25:1": "Cover Recommended ratio is 6.25:1"
}

View file

@ -9,6 +9,7 @@ import {
makeSelectAmountForUri,
makeSelectClaimForUri,
selectUpdateChannelError,
selectUpdatingChannel,
} from 'lbry-redux';
import ChannelPage from './view';
@ -26,6 +27,7 @@ const select = (state, props) => ({
amount: makeSelectAmountForUri(props.uri)(state),
claim: makeSelectClaimForUri(props.uri)(state),
updateError: selectUpdateChannelError(state),
updatingChannel: selectUpdatingChannel(state),
});
const perform = dispatch => ({

View file

@ -27,6 +27,7 @@ type Props = {
updateCover: string => void,
doneEditing: () => void,
updateError: string,
updatingChannel: boolean,
};
function ChannelForm(props: Props) {
@ -47,6 +48,7 @@ function ChannelForm(props: Props) {
updateThumb,
updateCover,
updateError,
updatingChannel,
} = props;
const { claim_id: claimId } = claim;
@ -204,7 +206,11 @@ function ChannelForm(props: Props) {
}}
/>
<div className={'section__actions'}>
<Button button="primary" label={__('Submit')} onClick={handleSubmit} />
<Button
button="primary"
label={updatingChannel ? __('Submitting...') : __('Submit')}
onClick={handleSubmit}
/>
<Button button="link" label={__('Cancel')} onClick={doneEditing} />
</div>
{updateError && updateError.length ? (

View file

@ -6347,9 +6347,9 @@ lazy-val@^1.0.4:
yargs "^13.2.2"
zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#d148806bbdc74fb194c67942e3a401a0724a2738:
lbry-redux@lbryio/lbry-redux#e9d03635883fbe87f1835fca0bf28b402cca6696:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/d148806bbdc74fb194c67942e3a401a0724a2738"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/e9d03635883fbe87f1835fca0bf28b402cca6696"
dependencies:
proxy-polyfill "0.1.6"
reselect "^3.0.0"