add uploadStatus to PublishForm

This commit is contained in:
Travis Eden 2018-04-02 09:35:52 -04:00 committed by Sean Yesmunt
parent 24214bf660
commit e32a597c38
2 changed files with 7 additions and 0 deletions

View file

@ -21,6 +21,7 @@ type Props = {
editingURI: ?string, editingURI: ?string,
title: ?string, title: ?string,
thumbnail: ?string, thumbnail: ?string,
uploadStatus: ?string,
description: ?string, description: ?string,
language: string, language: string,
nsfw: boolean, nsfw: boolean,
@ -267,6 +268,7 @@ class PublishForm extends React.PureComponent<Props> {
editingURI, editingURI,
title, title,
thumbnail, thumbnail,
uploadStatus,
description, description,
language, language,
nsfw, nsfw,
@ -360,6 +362,7 @@ class PublishForm extends React.PureComponent<Props> {
disabled={formDisabled} disabled={formDisabled}
onChange={e => updatePublishForm({ thumbnail: e.target.value })} onChange={e => updatePublishForm({ thumbnail: e.target.value })}
/> />
<p>status: {uploadStatus}</p>
</FormRow> </FormRow>
<FormRow padded> <FormRow padded>
<FormField <FormField

View file

@ -2,6 +2,7 @@
import { handleActions } from 'util/redux-utils'; import { handleActions } from 'util/redux-utils';
import { buildURI } from 'lbry-redux'; import { buildURI } from 'lbry-redux';
import * as ACTIONS from 'constants/action_types'; import * as ACTIONS from 'constants/action_types';
import * as STATUSES from 'constants/thumbnail_upload_statuses';
import { CHANNEL_ANONYMOUS } from 'constants/claim'; import { CHANNEL_ANONYMOUS } from 'constants/claim';
type PublishState = { type PublishState = {
@ -14,6 +15,7 @@ type PublishState = {
}, },
title: string, title: string,
thumbnail: string, thumbnail: string,
uploadStatus: string,
description: string, description: string,
language: string, language: string,
tosAccepted: boolean, tosAccepted: boolean,
@ -38,6 +40,7 @@ export type UpdatePublishFormData = {
}, },
title?: string, title?: string,
thumbnail?: string, thumbnail?: string,
uploadStatus?: string,
description?: string, description?: string,
language?: string, language?: string,
tosAccepted?: boolean, tosAccepted?: boolean,
@ -96,6 +99,7 @@ const defaultState: PublishState = {
}, },
title: '', title: '',
thumbnail: '', thumbnail: '',
uploadStatus: STATUSES.API_DOWN,
description: '', description: '',
language: 'en', language: 'en',
nsfw: false, nsfw: false,