being rendered.
9 | This is dumb but I'm just the guy who noticed -kj
10 | */
11 | const select = (state, props) => ({
12 | nextRecommendedClaim: makeSelectClaimForUri(props.nextRecommendedUri)(state),
13 | modal: selectModal(state),
14 | });
15 |
16 | export default withRouter(connect(select, null)(AutoplayCountdown));
17 |
--------------------------------------------------------------------------------
/ui/component/blockList/index.js:
--------------------------------------------------------------------------------
1 | import BlockList from './view';
2 | export default BlockList;
3 |
--------------------------------------------------------------------------------
/ui/component/button/index.js:
--------------------------------------------------------------------------------
1 | import Button from './view';
2 | import React, { forwardRef } from 'react';
3 | import { connect } from 'react-redux';
4 | import { selectUser, selectUserVerifiedEmail } from 'redux/selectors/user';
5 |
6 | const mapStateToProps = (state) => ({
7 | pathname: state.router.location.pathname,
8 | emailVerified: selectUserVerifiedEmail(state),
9 | user: selectUser(state),
10 | });
11 |
12 | const ConnectedButton = connect(mapStateToProps)(Button);
13 |
14 | export default forwardRef((props, ref) => );
15 |
--------------------------------------------------------------------------------
/ui/component/cardVerify/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { selectUserEmail } from 'redux/selectors/user';
3 | import CardVerify from './view';
4 |
5 | const select = state => ({
6 | email: selectUserEmail(state),
7 | });
8 |
9 | const perform = () => ({});
10 |
11 | export default connect(select, perform)(CardVerify);
12 |
--------------------------------------------------------------------------------
/ui/component/channelAbout/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectMetadataItemForUri, makeSelectClaimForUri } from 'redux/selectors/claims';
3 | import ChannelAbout from './view';
4 |
5 | const select = (state, props) => ({
6 | claim: makeSelectClaimForUri(props.uri)(state),
7 | description: makeSelectMetadataItemForUri(props.uri, 'description')(state),
8 | website: makeSelectMetadataItemForUri(props.uri, 'website_url')(state),
9 | email: makeSelectMetadataItemForUri(props.uri, 'email')(state),
10 | languages: makeSelectMetadataItemForUri(props.uri, 'languages')(state),
11 | });
12 |
13 | export default connect(select, null)(ChannelAbout);
14 |
--------------------------------------------------------------------------------
/ui/component/channelDiscussion/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { withRouter } from 'react-router';
3 | import { DISABLE_COMMENTS_TAG } from 'constants/tags';
4 | import ChannelDiscussion from './view';
5 | import { makeSelectTagInClaimOrChannelForUri } from 'redux/selectors/claims';
6 |
7 | const select = (state, props) => {
8 | const { search } = props.location;
9 | const urlParams = new URLSearchParams(search);
10 |
11 | return {
12 | linkedCommentId: urlParams.get('lc'),
13 | commentsDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
14 | };
15 | };
16 |
17 | export default withRouter(connect(select)(ChannelDiscussion));
18 |
--------------------------------------------------------------------------------
/ui/component/channelDiscussion/view.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import CommentsList from 'component/commentsList';
4 | import Empty from 'component/common/empty';
5 |
6 | type Props = {
7 | uri: string,
8 | linkedCommentId?: string,
9 | commentsDisabled: boolean,
10 | };
11 |
12 | function ChannelDiscussion(props: Props) {
13 | const { uri, linkedCommentId, commentsDisabled } = props;
14 |
15 | if (commentsDisabled) {
16 | return ;
17 | }
18 | return (
19 |
22 | );
23 | }
24 |
25 | export default ChannelDiscussion;
26 |
--------------------------------------------------------------------------------
/ui/component/channelMuteButton/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { doChannelMute, doChannelUnmute } from 'redux/actions/blocked';
3 | import { makeSelectChannelIsMuted } from 'redux/selectors/blocked';
4 | import ChannelMuteButton from './view';
5 |
6 | const select = (state, props) => ({
7 | isMuted: makeSelectChannelIsMuted(props.uri)(state),
8 | });
9 |
10 | export default connect(select, {
11 | doChannelMute,
12 | doChannelUnmute,
13 | })(ChannelMuteButton);
14 |
--------------------------------------------------------------------------------
/ui/component/channelSelector/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { selectMyChannelClaims } from 'redux/selectors/claims';
3 | import { selectActiveChannelClaim, selectIncognito } from 'redux/selectors/app';
4 | import { doSetActiveChannel, doSetIncognito } from 'redux/actions/app';
5 | import ChannelSelector from './view';
6 |
7 | const select = (state) => ({
8 | channels: selectMyChannelClaims(state),
9 | activeChannelClaim: selectActiveChannelClaim(state),
10 | incognito: selectIncognito(state),
11 | });
12 |
13 | export default connect(select, {
14 | doSetActiveChannel,
15 | doSetIncognito,
16 | })(ChannelSelector);
17 |
--------------------------------------------------------------------------------
/ui/component/channelStakedIndicator/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import {
3 | makeSelectClaimForUri,
4 | selectTotalStakedAmountForChannelUri,
5 | selectStakedLevelForChannelUri,
6 | } from 'redux/selectors/claims';
7 | import ChannelStakedIndicator from './view';
8 |
9 | const select = (state, props) => ({
10 | channelClaim: makeSelectClaimForUri(props.uri)(state),
11 | amount: selectTotalStakedAmountForChannelUri(state, props.uri),
12 | level: selectStakedLevelForChannelUri(state, props.uri),
13 | });
14 |
15 | export default connect(select)(ChannelStakedIndicator);
16 |
--------------------------------------------------------------------------------
/ui/component/channelThumbnail/gerbil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lbryio/lbry-desktop/d14c9141db0bfa2db9b5dcf78fcaa72912cc767a/ui/component/channelThumbnail/gerbil.png
--------------------------------------------------------------------------------
/ui/component/channelThumbnail/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { selectThumbnailForUri, selectClaimForUri, selectIsUriResolving } from 'redux/selectors/claims';
3 | import { doResolveUri } from 'redux/actions/claims';
4 | import ChannelThumbnail from './view';
5 |
6 | const select = (state, props) => ({
7 | thumbnail: selectThumbnailForUri(state, props.uri),
8 | claim: selectClaimForUri(state, props.uri),
9 | isResolving: selectIsUriResolving(state, props.uri),
10 | });
11 |
12 | export default connect(select, {
13 | doResolveUri,
14 | })(ChannelThumbnail);
15 |
--------------------------------------------------------------------------------
/ui/component/channelTitle/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectClaimForUri, selectTitleForUri } from 'redux/selectors/claims';
3 | import ChannelTitle from './view';
4 |
5 | const select = (state, props) => ({
6 | title: selectTitleForUri(state, props.uri),
7 | claim: makeSelectClaimForUri(props.uri)(state),
8 | });
9 |
10 | export default connect(select)(ChannelTitle);
11 |
--------------------------------------------------------------------------------
/ui/component/channelTitle/view.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 |
4 | type Props = {
5 | claim: ?ChannelClaim,
6 | title: ?string,
7 | };
8 |
9 | function ChannelTitle(props: Props) {
10 | const { title, claim } = props;
11 |
12 | if (!claim) {
13 | return null;
14 | }
15 |
16 | return {title || claim.name}
;
17 | }
18 |
19 | export default ChannelTitle;
20 |
--------------------------------------------------------------------------------
/ui/component/claimAbandonButton/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { doOpenModal } from 'redux/actions/app';
3 | import ClaimAbandonButton from './view';
4 |
5 | import { makeSelectClaimForUri } from 'redux/selectors/claims';
6 |
7 | const select = (state, props) => ({
8 | claim: props.uri && makeSelectClaimForUri(props.uri)(state),
9 | });
10 |
11 | export default connect(select, {
12 | doOpenModal,
13 | })(ClaimAbandonButton);
14 |
--------------------------------------------------------------------------------
/ui/component/claimAuthor/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectChannelForClaimUri } from 'redux/selectors/claims';
3 | import ClaimAuthor from './view';
4 |
5 | const select = (state, props) => ({
6 | channelUri: makeSelectChannelForClaimUri(props.uri)(state),
7 | });
8 |
9 | export default connect(select)(ClaimAuthor);
10 |
--------------------------------------------------------------------------------
/ui/component/claimAuthor/view.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import * as React from 'react';
3 | import ClaimPreview from 'component/claimPreview';
4 |
5 | type Props = {
6 | channelUri: string,
7 | hideActions?: boolean,
8 | channelSubCount?: number,
9 | };
10 |
11 | function ClaimAuthor(props: Props) {
12 | const { channelUri, hideActions, channelSubCount } = props;
13 |
14 | return channelUri ? (
15 |
23 | ) : (
24 | {__('Anonymous')}
25 | );
26 | }
27 |
28 | export default ClaimAuthor;
29 |
--------------------------------------------------------------------------------
/ui/component/claimCollectionAddButton/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { doOpenModal } from 'redux/actions/app';
3 | import CollectionAddButton from './view';
4 | import { makeSelectClaimForUri } from 'redux/selectors/claims';
5 | import { makeSelectClaimUrlInCollection } from 'redux/selectors/collections';
6 |
7 | const select = (state, props) => {
8 | const claim = makeSelectClaimForUri(props.uri)(state);
9 | const permanentUrl = claim && claim.permanent_url;
10 |
11 | return {
12 | claim,
13 | isSaved: makeSelectClaimUrlInCollection(permanentUrl)(state),
14 | };
15 | };
16 |
17 | export default connect(select, {
18 | doOpenModal,
19 | })(CollectionAddButton);
20 |
--------------------------------------------------------------------------------
/ui/component/claimEffectiveAmount/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectClaimForUri } from 'redux/selectors/claims';
3 | import ClaimEffectiveAmount from './view';
4 |
5 | const select = (state, props) => ({
6 | claim: makeSelectClaimForUri(props.uri, true)(state),
7 | });
8 |
9 | export default connect(select)(ClaimEffectiveAmount);
10 |
--------------------------------------------------------------------------------
/ui/component/claimEffectiveAmount/view.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import CreditAmount from 'component/common/credit-amount';
4 |
5 | type Props = {
6 | uri: string,
7 | claim: ?Claim,
8 | };
9 |
10 | function ClaimEffectiveAmount(props: Props) {
11 | const { claim } = props;
12 |
13 | if (!claim) {
14 | return null;
15 | }
16 |
17 | return ;
18 | }
19 |
20 | export default ClaimEffectiveAmount;
21 |
--------------------------------------------------------------------------------
/ui/component/claimInsufficientCredits/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { selectInsufficientCreditsForUri } from 'redux/selectors/content';
3 | import { makeSelectClaimWasPurchased } from 'redux/selectors/claims';
4 | import ClaimInsufficientCredits from './view';
5 |
6 | const select = (state, props) => ({
7 | isInsufficientCredits: selectInsufficientCreditsForUri(state, props.uri),
8 | claimWasPurchased: makeSelectClaimWasPurchased(props.uri)(state),
9 | });
10 |
11 | export default connect(select)(ClaimInsufficientCredits);
12 |
--------------------------------------------------------------------------------
/ui/component/claimList/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import ClaimList from './view';
3 | import * as SETTINGS from 'constants/settings';
4 |
5 | import { makeSelectClientSetting } from 'redux/selectors/settings';
6 |
7 | const select = (state) => ({
8 | searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
9 | });
10 |
11 | export default connect(select)(ClaimList);
12 |
--------------------------------------------------------------------------------
/ui/component/claimPreviewTitle/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectClaimForUri, selectTitleForUri } from 'redux/selectors/claims';
3 | import ClaimPreviewTitle from './view';
4 |
5 | const select = (state, props) => ({
6 | claim: makeSelectClaimForUri(props.uri)(state),
7 | title: selectTitleForUri(state, props.uri),
8 | });
9 |
10 | export default connect(select)(ClaimPreviewTitle);
11 |
--------------------------------------------------------------------------------
/ui/component/claimPreviewTitle/view.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import TruncatedText from 'component/common/truncated-text';
4 |
5 | type Props = {
6 | uri: string,
7 | claim: ?Claim,
8 | title: string,
9 | };
10 |
11 | function ClaimPreviewTitle(props: Props) {
12 | const { title, claim } = props;
13 |
14 | return (
15 |
16 | {claim ? : {__('Nothing here')}}
17 |
18 | );
19 | }
20 |
21 | export default ClaimPreviewTitle;
22 |
--------------------------------------------------------------------------------
/ui/component/claimProperties/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { selectClaimIsMine, selectClaimForUri } from 'redux/selectors/claims';
3 | import { selectIsSubscribedForUri } from 'redux/selectors/subscriptions';
4 | import ClaimProperties from './view';
5 |
6 | const select = (state, props) => {
7 | const claim = selectClaimForUri(state, props.uri);
8 |
9 | return {
10 | claim,
11 | isSubscribed: selectIsSubscribedForUri(state, props.uri),
12 | claimIsMine: selectClaimIsMine(state, claim),
13 | };
14 | };
15 |
16 | export default connect(select, null)(ClaimProperties);
17 |
--------------------------------------------------------------------------------
/ui/component/claimRepostAuthor/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectClaimForUri } from 'redux/selectors/claims';
3 | import ClaimRepostAuthor from './view';
4 |
5 | const select = (state, props) => ({
6 | claim: makeSelectClaimForUri(props.uri)(state),
7 | });
8 |
9 | export default connect(select)(ClaimRepostAuthor);
10 |
--------------------------------------------------------------------------------
/ui/component/claimRepostButton/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { doOpenModal } from 'redux/actions/app';
3 | import { doToast } from 'redux/actions/notifications';
4 | import ClaimReportButton from './view';
5 |
6 | export default connect(null, { doOpenModal, doToast })(ClaimReportButton);
7 |
--------------------------------------------------------------------------------
/ui/component/claimSupportButton/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { doOpenModal } from 'redux/actions/app';
3 | import { makeSelectTagInClaimOrChannelForUri, makeSelectClaimForUri } from 'redux/selectors/claims';
4 | import ClaimSupportButton from './view';
5 |
6 | const DISABLE_SUPPORT_TAG = 'disable-support';
7 | const select = (state, props) => ({
8 | disableSupport: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_SUPPORT_TAG)(state),
9 | claim: makeSelectClaimForUri(props.uri)(state),
10 | });
11 |
12 | export default connect(select, {
13 | doOpenModal,
14 | })(ClaimSupportButton);
15 |
--------------------------------------------------------------------------------
/ui/component/claimTags/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { selectTagsForUri } from 'redux/selectors/claims';
3 | import { selectFollowedTags } from 'redux/selectors/tags';
4 | import ClaimTags from './view';
5 |
6 | const select = (state, props) => ({
7 | tags: selectTagsForUri(state, props.uri),
8 | followedTags: selectFollowedTags(state),
9 | });
10 |
11 | export default connect(select, null)(ClaimTags);
12 |
--------------------------------------------------------------------------------
/ui/component/claimType/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectClaimForUri } from 'redux/selectors/claims';
3 | import FileType from './view';
4 |
5 | const select = (state, props) => ({
6 | claim: makeSelectClaimForUri(props.uri)(state),
7 | });
8 |
9 | export default connect(select)(FileType);
10 |
--------------------------------------------------------------------------------
/ui/component/claimUri/index.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import { makeSelectCanonicalUrlForUri } from 'redux/selectors/claims';
3 | import { doToast } from 'redux/actions/notifications';
4 | import ClaimUri from './view';
5 |
6 | const select = (state, props) => ({
7 | shortUrl: makeSelectCanonicalUrlForUri(props.uri)(state),
8 | });
9 |
10 | export default connect(select, {
11 | doToast,
12 | })(ClaimUri);
13 |
--------------------------------------------------------------------------------
/ui/component/collectionPreviewTile/collectionCount.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import classnames from 'classnames';
4 | import * as ICONS from 'constants/icons';
5 | import Icon from 'component/common/icon';
6 | type Props = {
7 | count: number,
8 | };
9 |
10 | export default function collectionCount(props: Props) {
11 | const { count = 0 } = props;
12 |
13 | return (
14 |
18 | );
19 | }
20 |
--------------------------------------------------------------------------------
/ui/component/collectionPreviewTile/collectionPrivate.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import classnames from 'classnames';
4 | import * as ICONS from 'constants/icons';
5 | import Icon from 'component/common/icon';
6 |
7 | export default function collectionCount() {
8 | return (
9 |
10 |
11 |
{__('Private')}
12 |
13 | );
14 | }
15 |
--------------------------------------------------------------------------------
/ui/component/common/busy-indicator.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 |
4 | type Props = {
5 | message: ?string,
6 | };
7 |
8 | class BusyIndicator extends React.PureComponent {
9 | static defaultProps = {
10 | message: '',
11 | };
12 |
13 | render() {
14 | const { message } = this.props;
15 |
16 | return (
17 |
18 | {message}
19 |
20 | );
21 | }
22 | }
23 |
24 | export default BusyIndicator;
25 |
--------------------------------------------------------------------------------
/ui/component/common/empty.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import classnames from 'classnames';
4 |
5 | type Props = {
6 | text: string,
7 | padded?: boolean,
8 | };
9 |
10 | export default function Empty(props: Props) {
11 | const { text = '', padded = false } = props;
12 |
13 | return (
14 |
15 |
16 | {text && (
17 |
20 | )}
21 |
22 |
23 | );
24 | }
25 |
--------------------------------------------------------------------------------
/ui/component/common/error-text.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 |
4 | type Props = {
5 | children: string,
6 | };
7 |
8 | export default function ErrorText(props: Props) {
9 | const { children } = props;
10 |
11 | if (!children) {
12 | return null;
13 | }
14 |
15 | // Add a period to the end of error messages
16 | let errorMessage = children[0].toUpperCase() + children.slice(1);
17 | errorMessage = errorMessage.endsWith('.') ? errorMessage : `${errorMessage}.`;
18 |
19 | return {errorMessage};
20 | }
21 |
--------------------------------------------------------------------------------
/ui/component/common/form-components/form.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import * as React from 'react';
3 |
4 | type Props = {
5 | children: React.Node,
6 | onSubmit: any => any,
7 | };
8 |
9 | export class Form extends React.PureComponent {
10 | render() {
11 | const { children, onSubmit, ...otherProps } = this.props;
12 | return (
13 |
24 | );
25 | }
26 | }
27 |
28 | export default Form;
29 |
--------------------------------------------------------------------------------
/ui/component/common/form-components/submit.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import * as React from 'react';
3 | import Button from 'component/button';
4 |
5 | type Props = {
6 | label: string,
7 | disabled: boolean,
8 | };
9 |
10 | export class Submit extends React.PureComponent {
11 | static defaultProps = {
12 | label: 'Submit',
13 | };
14 |
15 | render() {
16 | const { label, disabled, ...otherProps } = this.props;
17 | return ;
18 | }
19 | }
20 |
21 | export default Submit;
22 |
--------------------------------------------------------------------------------
/ui/component/common/form.jsx:
--------------------------------------------------------------------------------
1 | export { Form } from './form-components/form';
2 | export { FormField } from './form-components/form-field';
3 | export { FormFieldAreaAdvanced } from './form-components/form-field-area-advanced';
4 | export { FormFieldPrice } from './form-components/form-field-price';
5 | export { Submit } from './form-components/submit';
6 |
--------------------------------------------------------------------------------
/ui/component/common/header-menu-link.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import React from 'react';
3 | import { Link } from 'react-router-dom';
4 | import { MenuLink } from '@reach/menu-button';
5 | import Icon from 'component/common/icon';
6 |
7 | type Props = {
8 | icon: string,
9 | name: string,
10 | page: string,
11 | };
12 |
13 | export default function HeaderMenuLink(props: Props) {
14 | const { icon, name, page } = props;
15 |
16 | return (
17 |
18 |
19 | {name}
20 |
21 | );
22 | }
23 |
--------------------------------------------------------------------------------
/ui/component/common/help-link.jsx:
--------------------------------------------------------------------------------
1 | // @flow
2 | import * as ICONS from 'constants/icons';
3 | import React from 'react';
4 | import Button from 'component/button';
5 |
6 | type Props = {
7 | href?: string,
8 | navigate?: string,
9 | icon?: string,
10 | description?: string,
11 | };
12 |
13 | export default function HelpLink(props: Props) {
14 | const { href, navigate, icon, description } = props;
15 | return (
16 |