Removes ability to create comments anonymously

This commit is contained in:
Oleg Silkin 2020-02-18 17:37:54 -05:00 committed by Sean Yesmunt
parent 73d6fd9e90
commit e1bc577efd
2 changed files with 4 additions and 6 deletions

View file

@ -1,7 +1,7 @@
// @flow // @flow
import React, { useEffect, Fragment } from 'react'; import React, { useEffect, Fragment } from 'react';
import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim'; import { CHANNEL_NEW } from 'constants/claim';
import { buildURI, isURIValid } from 'lbry-redux'; import { buildURI, isURIValid } from 'lbry-redux';
import ChannelCreate from 'component/channelCreate'; import ChannelCreate from 'component/channelCreate';
import Card from 'component/common/card'; import Card from 'component/common/card';
@ -21,7 +21,7 @@ function ChannelForm(props: Props) {
// Every time the channel or name changes, resolve the uris to find winning bid amounts // Every time the channel or name changes, resolve the uris to find winning bid amounts
useEffect(() => { useEffect(() => {
// If they are midway through a channel creation, treat it as anonymous until it completes // If they are midway through a channel creation, treat it as anonymous until it completes
const channelName = channel === CHANNEL_ANONYMOUS || channel === CHANNEL_NEW ? '' : channel; const channelName = channel === CHANNEL_NEW ? '' : channel;
// We are only going to store the full uri, but we need to resolve the uri with and without the channel name // We are only going to store the full uri, but we need to resolve the uri with and without the channel name
let uri; let uri;

View file

@ -1,5 +1,5 @@
// @flow // @flow
import { CHANNEL_NEW, CHANNEL_ANONYMOUS } from 'constants/claim'; import { CHANNEL_NEW } from 'constants/claim';
import React, { Fragment } from 'react'; import React, { Fragment } from 'react';
import { FormField } from 'component/common/form'; import { FormField } from 'component/common/form';
import ChannelCreate from 'component/channelCreate'; import ChannelCreate from 'component/channelCreate';
@ -12,7 +12,6 @@ type Props = {
createChannel: (string, number) => Promise<any>, createChannel: (string, number) => Promise<any>,
fetchChannelListMine: () => void, fetchChannelListMine: () => void,
fetchingChannels: boolean, fetchingChannels: boolean,
hideAnon: boolean,
includeNew?: boolean, includeNew?: boolean,
label?: string, label?: string,
injected?: Array<string>, injected?: Array<string>,
@ -71,7 +70,7 @@ class ChannelSection extends React.PureComponent<Props, State> {
render() { render() {
const channel = this.state.addingChannel ? 'new' : this.props.channel; const channel = this.state.addingChannel ? 'new' : this.props.channel;
const { fetchingChannels, channels = [], hideAnon, label, injected = [] } = this.props; const { fetchingChannels, channels = [], label, injected = [] } = this.props;
const { addingChannel } = this.state; const { addingChannel } = this.state;
return ( return (
@ -83,7 +82,6 @@ class ChannelSection extends React.PureComponent<Props, State> {
onChange={this.handleChannelChange} onChange={this.handleChannelChange}
value={channel} value={channel}
> >
{!hideAnon && <option value={CHANNEL_ANONYMOUS}>{__('Anonymous')}</option>}
{channels && {channels &&
channels.map(({ name, claim_id: claimId }) => ( channels.map(({ name, claim_id: claimId }) => (
<option key={claimId} value={name}> <option key={claimId} value={name}>