comments on lbry.tv
This commit is contained in:
parent
7376500832
commit
31d4f9614c
5 changed files with 12 additions and 7 deletions
|
@ -4,7 +4,6 @@ import React, { useEffect, useState } from 'react';
|
||||||
import { FormField, Form } from 'component/common/form';
|
import { FormField, Form } from 'component/common/form';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import ChannelSection from 'component/selectChannel';
|
import ChannelSection from 'component/selectChannel';
|
||||||
import UnsupportedOnWeb from 'component/common/unsupported-on-web';
|
|
||||||
import usePersistedState from 'effects/use-persisted-state';
|
import usePersistedState from 'effects/use-persisted-state';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -42,8 +41,6 @@ export function CommentCreate(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<UnsupportedOnWeb type="feature" />
|
|
||||||
{/* @if TARGET='app' */}
|
|
||||||
{commentAck !== true && (
|
{commentAck !== true && (
|
||||||
<div>
|
<div>
|
||||||
<p>{__('A few things to know before participating in the comment alpha:')}</p>
|
<p>{__('A few things to know before participating in the comment alpha:')}</p>
|
||||||
|
@ -94,7 +91,6 @@ export function CommentCreate(props: Props) {
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
)}
|
)}
|
||||||
{/* @endif */}
|
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ import SelectThumbnail from 'component/selectThumbnail';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
disabled: boolean,
|
||||||
tags: Array<Tag>,
|
tags: Array<Tag>,
|
||||||
publish: PublishParams => void,
|
publish: PublishParams => void,
|
||||||
filePath: ?string,
|
filePath: ?string,
|
||||||
|
@ -82,6 +83,7 @@ function PublishForm(props: Props) {
|
||||||
isStillEditing,
|
isStillEditing,
|
||||||
tags,
|
tags,
|
||||||
publish,
|
publish,
|
||||||
|
disabled = false,
|
||||||
} = props;
|
} = props;
|
||||||
const formDisabled = (!filePath && !editingURI) || publishing;
|
const formDisabled = (!filePath && !editingURI) || publishing;
|
||||||
// If they are editing, they don't need a new file chosen
|
// If they are editing, they don't need a new file chosen
|
||||||
|
@ -130,7 +132,7 @@ function PublishForm(props: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<PublishFile disabled={publishing} />
|
<PublishFile disabled={disabled || publishing} />
|
||||||
<div className={classnames({ 'card--disabled': formDisabled })}>
|
<div className={classnames({ 'card--disabled': formDisabled })}>
|
||||||
<PublishText disabled={formDisabled} />
|
<PublishText disabled={formDisabled} />
|
||||||
<Card actions={<SelectThumbnail />} />
|
<Card actions={<SelectThumbnail />} />
|
||||||
|
|
|
@ -7,11 +7,13 @@ import {
|
||||||
doFetchChannelListMine,
|
doFetchChannelListMine,
|
||||||
doCreateChannel,
|
doCreateChannel,
|
||||||
} from 'lbry-redux';
|
} from 'lbry-redux';
|
||||||
|
import { selectUserVerifiedEmail } from 'lbryinc';
|
||||||
|
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
channels: selectMyChannelClaims(state),
|
channels: selectMyChannelClaims(state),
|
||||||
fetchingChannels: selectFetchingMyChannels(state),
|
fetchingChannels: selectFetchingMyChannels(state),
|
||||||
balance: selectBalance(state),
|
balance: selectBalance(state),
|
||||||
|
emailVerified: selectUserVerifiedEmail(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
|
|
|
@ -16,6 +16,7 @@ type Props = {
|
||||||
createChannel: (string, number) => Promise<any>,
|
createChannel: (string, number) => Promise<any>,
|
||||||
fetchChannelListMine: () => void,
|
fetchChannelListMine: () => void,
|
||||||
fetchingChannels: boolean,
|
fetchingChannels: boolean,
|
||||||
|
emailVerified: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
|
@ -49,7 +50,11 @@ class ChannelSection extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { channels, fetchChannelListMine, fetchingChannels } = this.props;
|
const { channels, fetchChannelListMine, fetchingChannels, emailVerified } = this.props;
|
||||||
|
if (IS_WEB && !emailVerified) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((!channels || !channels.length) && !fetchingChannels) {
|
if ((!channels || !channels.length) && !fetchingChannels) {
|
||||||
fetchChannelListMine();
|
fetchChannelListMine();
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ function PublishPage(props: Props) {
|
||||||
</section>
|
</section>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)}
|
)}
|
||||||
<PublishForm scrollToTop={scrollToTop} />
|
<PublishForm scrollToTop={scrollToTop} disabled={balance === 0} />
|
||||||
</Page>
|
</Page>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue