From ab9f70930d136200faab3fff495189d17c3b6f4a Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 19 Oct 2021 00:49:51 -0400 Subject: [PATCH] strip out livestreams --- ui/component/channelContent/view.jsx | 4 - .../channelMentionSuggestions/view.jsx | 9 - ui/component/claimPreview/index.js | 4 - ui/component/claimPreview/view.jsx | 19 +- ui/component/claimPreviewSubtitle/index.js | 7 +- ui/component/claimPreviewSubtitle/view.jsx | 19 +- ui/component/claimPreviewTile/index.js | 4 - ui/component/claimPreviewTile/view.jsx | 16 +- ui/component/claimType/index.js | 3 +- ui/component/commentCreate/index.js | 13 +- ui/component/commentCreate/view.jsx | 26 +- ui/component/common/icon-custom.jsx | 526 ------------------ ui/component/fileActions/index.js | 2 - ui/component/fileActions/view.jsx | 30 +- ui/component/fileReactions/view.jsx | 19 +- ui/component/fileSubtitle/view.jsx | 12 +- ui/component/fileTitleSection/index.js | 3 - ui/component/fileTitleSection/view.jsx | 18 +- ui/component/fileType/index.js | 2 - ui/component/fileType/view.jsx | 5 +- ui/component/fileViewCount/view.jsx | 18 +- ui/component/fileViewCountInline/view.jsx | 7 +- ui/component/header/index.js | 3 +- ui/component/header/view.jsx | 26 +- ui/component/livestreamComment/index.js | 10 - ui/component/livestreamComment/view.jsx | 133 ----- ui/component/livestreamComments/index.js | 29 - ui/component/livestreamComments/view.jsx | 319 ----------- ui/component/livestreamLayout/index.js | 16 - ui/component/livestreamLayout/view.jsx | 63 --- ui/component/livestreamLink/index.js | 9 - ui/component/livestreamLink/view.jsx | 101 ---- ui/component/livestreamList/index.js | 6 - ui/component/livestreamList/view.jsx | 78 --- ui/component/notification/view.jsx | 8 +- ui/component/page/view.jsx | 6 +- ui/component/publishFile/index.js | 4 +- ui/component/publishFile/view.jsx | 312 +---------- ui/component/publishForm/index.js | 3 +- ui/component/publishForm/view.jsx | 120 +--- ui/component/router/view.jsx | 4 - ui/constants/action_types.js | 10 - ui/constants/form-field.js | 1 - ui/constants/icons.js | 3 - ui/constants/livestream.js | 4 - ui/constants/pageTitles.js | 2 - ui/constants/pages.js | 2 - ui/constants/publish_types.js | 1 - ui/modal/modalPublish/index.js | 7 +- ui/modal/modalPublish/view.jsx | 45 +- ui/modal/modalPublishPreview/index.js | 9 +- ui/modal/modalPublishPreview/view.jsx | 32 +- ui/page/discover/index.js | 4 - ui/page/file/index.js | 2 - ui/page/file/view.jsx | 19 - ui/page/livestream/index.js | 22 - ui/page/livestream/view.jsx | 124 ----- ui/page/livestreamCurrent/index.js | 9 - ui/page/livestreamCurrent/view.jsx | 34 -- ui/page/livestreamSetup/index.js | 35 -- ui/page/livestreamSetup/view.jsx | 324 ----------- ui/page/ownComments/view.jsx | 2 - ui/page/settingsCreator/view.jsx | 6 +- ui/page/show/index.js | 2 - ui/page/show/view.jsx | 6 - ui/reducers.js | 2 - ui/redux/actions/comments.js | 3 - ui/redux/actions/livestream.js | 122 ---- ui/redux/actions/publish.js | 59 +- ui/redux/actions/websocket.js | 7 - ui/redux/reducers/comments.js | 56 +- ui/redux/reducers/livestream.js | 61 -- ui/redux/selectors/livestream.js | 62 --- ui/scss/all.scss | 1 - ui/scss/component/_livestream.scss | 469 ---------------- ui/scss/component/_main.scss | 41 -- ui/scss/init/_vars.scss | 2 - ui/util/livestream.js | 24 - 78 files changed, 126 insertions(+), 3504 deletions(-) delete mode 100644 ui/component/livestreamComment/index.js delete mode 100644 ui/component/livestreamComment/view.jsx delete mode 100644 ui/component/livestreamComments/index.js delete mode 100644 ui/component/livestreamComments/view.jsx delete mode 100644 ui/component/livestreamLayout/index.js delete mode 100644 ui/component/livestreamLayout/view.jsx delete mode 100644 ui/component/livestreamLink/index.js delete mode 100644 ui/component/livestreamLink/view.jsx delete mode 100644 ui/component/livestreamList/index.js delete mode 100644 ui/component/livestreamList/view.jsx delete mode 100644 ui/constants/livestream.js delete mode 100644 ui/page/livestream/index.js delete mode 100644 ui/page/livestream/view.jsx delete mode 100644 ui/page/livestreamCurrent/index.js delete mode 100644 ui/page/livestreamCurrent/view.jsx delete mode 100644 ui/page/livestreamSetup/index.js delete mode 100644 ui/page/livestreamSetup/view.jsx delete mode 100644 ui/redux/actions/livestream.js delete mode 100644 ui/redux/reducers/livestream.js delete mode 100644 ui/redux/selectors/livestream.js delete mode 100644 ui/scss/component/_livestream.scss delete mode 100644 ui/util/livestream.js diff --git a/ui/component/channelContent/view.jsx b/ui/component/channelContent/view.jsx index 198c213c8..11aa4eedb 100644 --- a/ui/component/channelContent/view.jsx +++ b/ui/component/channelContent/view.jsx @@ -7,7 +7,6 @@ import { useHistory } from 'react-router-dom'; import Button from 'component/button'; import ClaimListDiscover from 'component/claimListDiscover'; import Icon from 'component/common/icon'; -import LivestreamLink from 'component/livestreamLink'; import { Form, FormField } from 'component/common/form'; import { DEBOUNCE_WAIT_DURATION_MS } from 'constants/search'; import { lighthouse } from 'redux/actions/search'; @@ -115,9 +114,6 @@ function ChannelContent(props: Props) { {!fetching && Boolean(claimsInChannel) && !channelIsBlocked && !channelIsBlackListed && ( )} - - - {!fetching && channelIsBlackListed && (

diff --git a/ui/component/channelMentionSuggestions/view.jsx b/ui/component/channelMentionSuggestions/view.jsx index d3fefd1f9..bb04de507 100644 --- a/ui/component/channelMentionSuggestions/view.jsx +++ b/ui/component/channelMentionSuggestions/view.jsx @@ -19,11 +19,9 @@ type Props = { mentionTerm: string, noTopSuggestion?: boolean, showMature: boolean, - isLivestream: boolean, creatorUri: string, commentorUris: Array, subscriptionUris: Array, - unresolvedCommentors: Array, unresolvedSubscriptions: Array, canonicalCreator: string, canonicalCommentors: Array, @@ -34,10 +32,8 @@ type Props = { export default function ChannelMentionSuggestions(props: Props) { const { - unresolvedCommentors, unresolvedSubscriptions, canonicalCreator, - isLivestream, creatorUri, inputRef, showMature, @@ -184,11 +180,6 @@ export default function ChannelMentionSuggestions(props: Props) { } }, [doResolveUris, stringifiedResults]); - // Only resolve commentors on Livestreams when actually mentioning/looking for it - React.useEffect(() => { - if (isLivestream && unresolvedCommentors && mentionTerm) doResolveUris(unresolvedCommentors); - }, [doResolveUris, isLivestream, mentionTerm, unresolvedCommentors]); - // Only resolve the subscriptions that match the mention term, instead of all React.useEffect(() => { if (isTyping) return; diff --git a/ui/component/claimPreview/index.js b/ui/component/claimPreview/index.js index 5e5cdd378..b63696f69 100644 --- a/ui/component/claimPreview/index.js +++ b/ui/component/claimPreview/index.js @@ -7,7 +7,6 @@ import { makeSelectClaimIsNsfw, makeSelectReflectingClaimForUri, makeSelectClaimWasPurchased, - makeSelectClaimIsStreamPlaceholder, makeSelectTitleForUri, makeSelectDateForUri, } from 'redux/selectors/claims'; @@ -23,7 +22,6 @@ import { doCollectionEdit } from 'redux/actions/collections'; import { doFileGet } from 'redux/actions/file'; import { selectMutedChannels, makeSelectChannelIsMuted } from 'redux/selectors/blocked'; import { selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; -import { makeSelectIsActiveLivestream } from 'redux/selectors/livestream'; import { selectShowMatureContent } from 'redux/selectors/settings'; import { makeSelectHasVisitedUri } from 'redux/selectors/content'; import { makeSelectIsSubscribed } from 'redux/selectors/subscriptions'; @@ -58,8 +56,6 @@ const select = (state, props) => { isSubscribed: props.uri && makeSelectIsSubscribed(props.uri, true)(state), streamingUrl: props.uri && makeSelectStreamingUrlForUri(props.uri)(state), wasPurchased: props.uri && makeSelectClaimWasPurchased(props.uri)(state), - isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), - isLivestreamActive: makeSelectIsActiveLivestream(props.uri)(state), isCollectionMine: makeSelectCollectionIsMine(props.collectionId)(state), collectionUris: makeSelectUrlsForCollectionId(props.collectionId)(state), collectionIndex: makeSelectIndexForUrlInCollection(props.uri, props.collectionId)(state), diff --git a/ui/component/claimPreview/view.jsx b/ui/component/claimPreview/view.jsx index 38ce66c9c..f5735efcd 100644 --- a/ui/component/claimPreview/view.jsx +++ b/ui/component/claimPreview/view.jsx @@ -10,7 +10,6 @@ import { formatLbryUrlForWeb } from 'util/url'; import { formatClaimPreviewTitle } from 'util/formatAriaLabel'; import FileThumbnail from 'component/fileThumbnail'; import UriIndicator from 'component/uriIndicator'; -import PreviewOverlayProperties from 'component/previewOverlayProperties'; import ClaimTags from 'component/claimTags'; import SubscribeButton from 'component/subscribeButton'; import ChannelThumbnail from 'component/channelThumbnail'; @@ -26,7 +25,6 @@ import ClaimMenuList from 'component/claimMenuList'; import ClaimPreviewLoading from './claim-preview-loading'; import ClaimPreviewHidden from './claim-preview-no-mature'; import ClaimPreviewNoContent from './claim-preview-no-content'; -import { ENABLE_NO_SOURCE_CLAIMS } from 'config'; import Button from 'component/button'; import * as ICONS from 'constants/icons'; @@ -78,8 +76,6 @@ type Props = { hideRepostLabel?: boolean, repostUrl?: string, hideMenu?: boolean, - isLivestream?: boolean, - isLivestreamActive: boolean, collectionId?: string, editCollection: (string, CollectionEditParams) => void, isCollectionMine: boolean, @@ -144,8 +140,6 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { renderActions, hideMenu = false, // repostUrl, - isLivestream, // need both? CHECK - isLivestreamActive, collectionId, collectionIndex, editCollection, @@ -296,7 +290,7 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { } }, [isValid, uri, isResolvingUri, shouldFetch, resolveUri]); - if ((shouldHide && !showNullPlaceholder) || (isLivestream && !ENABLE_NO_SOURCE_CLAIMS)) { + if (shouldHide && !showNullPlaceholder) { return null; } @@ -329,11 +323,6 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { return null; } - let liveProperty = null; - if (isLivestreamActive === true) { - liveProperty = (claim) => <>LIVE; - } - return ( ((props: Props, ref: any) => { 'claim-preview__wrapper--channel': isChannelUri && type !== 'inline', 'claim-preview__wrapper--inline': type === 'inline', 'claim-preview__wrapper--small': type === 'small', - 'claim-preview__live': isLivestreamActive, 'claim-preview__active': active, })} > @@ -380,11 +368,6 @@ const ClaimPreview = forwardRef((props: Props, ref: any) => { )} {/* @endif */} - {(!isLivestream || isLivestreamActive) && ( -

- -
- )} ) : ( diff --git a/ui/component/claimPreviewSubtitle/index.js b/ui/component/claimPreviewSubtitle/index.js index cf5f1826d..12d608361 100644 --- a/ui/component/claimPreviewSubtitle/index.js +++ b/ui/component/claimPreviewSubtitle/index.js @@ -1,10 +1,6 @@ import * as PAGES from 'constants/pages'; import { connect } from 'react-redux'; -import { - makeSelectClaimForUri, - makeSelectClaimIsPending, - makeSelectClaimIsStreamPlaceholder, -} from 'redux/selectors/claims'; +import { makeSelectClaimForUri, makeSelectClaimIsPending } from 'redux/selectors/claims'; import { doClearPublish, doPrepareEdit } from 'redux/actions/publish'; import { push } from 'connected-react-router'; import ClaimPreviewSubtitle from './view'; @@ -12,7 +8,6 @@ import ClaimPreviewSubtitle from './view'; const select = (state, props) => ({ claim: makeSelectClaimForUri(props.uri)(state), pending: makeSelectClaimIsPending(props.uri)(state), - isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), }); const perform = (dispatch) => ({ diff --git a/ui/component/claimPreviewSubtitle/view.jsx b/ui/component/claimPreviewSubtitle/view.jsx index 507abf2a7..e2d0afb0d 100644 --- a/ui/component/claimPreviewSubtitle/view.jsx +++ b/ui/component/claimPreviewSubtitle/view.jsx @@ -1,5 +1,4 @@ // @flow -import { ENABLE_NO_SOURCE_CLAIMS } from 'config'; import React from 'react'; import UriIndicator from 'component/uriIndicator'; import DateTime from 'component/dateTime'; @@ -13,12 +12,11 @@ type Props = { pending?: boolean, type: string, beginPublish: (?string) => void, - isLivestream: boolean, }; // previews used in channel overview and homepage (and other places?) function ClaimPreviewSubtitle(props: Props) { - const { pending, uri, claim, type, beginPublish, isLivestream } = props; + const { pending, uri, claim, type, beginPublish } = props; const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0; let isChannel; @@ -38,15 +36,12 @@ function ClaimPreviewSubtitle(props: Props) { type !== 'inline' && `${claimsInChannel} ${claimsInChannel === 1 ? __('upload') : __('uploads')}`} - {!isChannel && - (isLivestream && ENABLE_NO_SOURCE_CLAIMS ? ( - __('Livestream') - ) : ( - <> - - - - ))} + {!isChannel && ( + <> + + + + )} )} diff --git a/ui/component/claimPreviewTile/index.js b/ui/component/claimPreviewTile/index.js index 6209a71ae..b3be8f36d 100644 --- a/ui/component/claimPreviewTile/index.js +++ b/ui/component/claimPreviewTile/index.js @@ -6,14 +6,12 @@ import { makeSelectTitleForUri, makeSelectChannelForClaimUri, makeSelectClaimIsNsfw, - makeSelectClaimIsStreamPlaceholder, makeSelectDateForUri, } from 'redux/selectors/claims'; import { doFileGet } from 'redux/actions/file'; import { doResolveUri } from 'redux/actions/claims'; import { selectMutedChannels } from 'redux/selectors/blocked'; import { makeSelectViewCountForUri, selectBlackListedOutpoints, selectFilteredOutpoints } from 'lbryinc'; -import { makeSelectIsActiveLivestream } from 'redux/selectors/livestream'; import { selectShowMatureContent } from 'redux/selectors/settings'; import ClaimPreviewTile from './view'; import formatMediaDuration from 'util/formatMediaDuration'; @@ -36,8 +34,6 @@ const select = (state, props) => { blockedChannelUris: selectMutedChannels(state), showMature: selectShowMatureContent(state), isMature: makeSelectClaimIsNsfw(props.uri)(state), - isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), - isLivestreamActive: makeSelectIsActiveLivestream(props.uri)(state), viewCount: makeSelectViewCountForUri(props.uri)(state), }; }; diff --git a/ui/component/claimPreviewTile/view.jsx b/ui/component/claimPreviewTile/view.jsx index 8c562b269..1c921f64e 100644 --- a/ui/component/claimPreviewTile/view.jsx +++ b/ui/component/claimPreviewTile/view.jsx @@ -49,10 +49,7 @@ type Props = { showHiddenByUser?: boolean, properties?: (Claim) => void, collectionId?: string, - showNoSourceClaims?: boolean, - isLivestream: boolean, viewCount: string, - isLivestreamActive: boolean, }; // preview image cards used in related video functionality, channel overview page and homepage @@ -76,9 +73,6 @@ function ClaimPreviewTile(props: Props) { showMature, showHiddenByUser, properties, - showNoSourceClaims, - isLivestream, - isLivestreamActive, collectionId, mediaDuration, viewCount, @@ -175,13 +169,13 @@ function ClaimPreviewTile(props: Props) { shouldHide = blockedChannelUris.some((blockedUri) => isURIEqual(blockedUri, signingChannel.permanent_url)); } - if (shouldHide || (isLivestream && !showNoSourceClaims)) { + if (shouldHide) { return null; } const isChannelPage = window.location.pathname.startsWith('/@'); - const shouldShowViewCount = !(!viewCount || (claim && claim.repost_url) || isLivestream || !isChannelPage); + const shouldShowViewCount = !(!viewCount || (claim && claim.repost_url) || !isChannelPage); if (placeholder || (!claim && isResolvingUri)) { return ( @@ -202,16 +196,12 @@ function ClaimPreviewTile(props: Props) { } let liveProperty = null; - if (isLivestreamActive === true) { - liveProperty = (claim) => <>LIVE; - } return (
  • @@ -273,7 +263,7 @@ function ClaimPreviewTile(props: Props) {
    - +
    diff --git a/ui/component/claimType/index.js b/ui/component/claimType/index.js index 98034acda..64ef15cb6 100644 --- a/ui/component/claimType/index.js +++ b/ui/component/claimType/index.js @@ -1,10 +1,9 @@ import { connect } from 'react-redux'; -import { makeSelectClaimForUri, makeSelectClaimIsStreamPlaceholder } from 'redux/selectors/claims'; +import { makeSelectClaimForUri } from 'redux/selectors/claims'; import FileType from './view'; const select = (state, props) => ({ claim: makeSelectClaimForUri(props.uri)(state), - isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), }); export default connect(select)(FileType); diff --git a/ui/component/commentCreate/index.js b/ui/component/commentCreate/index.js index baa416468..61d209e5d 100644 --- a/ui/component/commentCreate/index.js +++ b/ui/component/commentCreate/index.js @@ -26,18 +26,7 @@ const select = (state, props) => ({ const perform = (dispatch, ownProps) => ({ createComment: (comment, claimId, parentId, txid, payment_intent_id, environment) => - dispatch( - doCommentCreate( - comment, - claimId, - parentId, - ownProps.uri, - ownProps.livestream, - txid, - payment_intent_id, - environment - ) - ), + dispatch(doCommentCreate(comment, claimId, parentId, ownProps.uri, txid, payment_intent_id, environment)), sendTip: (params, callback, errorCallback) => dispatch(doSendTip(params, false, callback, errorCallback, false)), doToast: (options) => dispatch(doToast(options)), doFetchCreatorSettings: (channelClaimId) => dispatch(doFetchCreatorSettings(channelClaimId)), diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index eedeb5c2c..f0635650d 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -1,5 +1,5 @@ // @flow -import { FF_MAX_CHARS_IN_COMMENT, FF_MAX_CHARS_IN_LIVESTREAM_COMMENT } from 'constants/form-field'; +import { FF_MAX_CHARS_IN_COMMENT } from 'constants/form-field'; import { FormField, Form } from 'component/common/form'; import { getChannelIdFromClaim } from 'util/claim'; import { Lbryio } from 'lbryinc'; @@ -40,7 +40,6 @@ type Props = { activeChannel: string, activeChannelClaim: ?ChannelClaim, bottom: boolean, - livestream?: boolean, embed?: boolean, claimIsMine: boolean, supportDisabled: boolean, @@ -68,8 +67,6 @@ export function CommentCreate(props: Props) { parentId, activeChannelClaim, bottom, - livestream, - embed, claimIsMine, settingsByChannelId, supportDisabled, @@ -179,7 +176,6 @@ export function CommentCreate(props: Props) { let newMentionValue = mentionValue.replace('lbry://', ''); if (newMentionValue.includes('#')) newMentionValue = newMentionValue.replace('#', ':'); - if (livestream && key !== KEYCODES.TAB) setPauseQuickSend(true); setCommentValue( commentValue.substring(0, selectedMentionIndex) + `${newMentionValue}` + @@ -190,7 +186,7 @@ export function CommentCreate(props: Props) { } function altEnterListener(e: SyntheticKeyboardEvent<*>) { - if ((livestream || e.ctrlKey || e.metaKey) && e.keyCode === KEYCODES.ENTER) { + if ((e.ctrlKey || e.metaKey) && e.keyCode === KEYCODES.ENTER) { e.preventDefault(); buttonRef.current.click(); } @@ -442,17 +438,8 @@ export function CommentCreate(props: Props) {
    { - if (embed) { - window.open(`https://odysee.com/$/${PAGES.AUTH}?redirect=/$/${PAGES.LIVESTREAM}`); - return; - } - const pathPlusRedirect = `/$/${PAGES.CHANNEL_NEW}?redirect=${pathname}`; - if (livestream) { - window.open(pathPlusRedirect); - } else { - push(pathPlusRedirect); - } + push(pathPlusRedirect); }} > @@ -518,7 +505,6 @@ export function CommentCreate(props: Props) { {!advancedEditor && ( - {!livestream && ( -
    {isReply ? __('Replying as') + ' ' : __('Comment as') + ' '}
    - )} +
    {isReply ? __('Replying as') + ' ' : __('Comment as') + ' '}
    } @@ -548,7 +532,7 @@ export function CommentCreate(props: Props) { charCount={charCount} onChange={handleCommentChange} autoFocus={isReply} - textAreaMaxLength={livestream ? FF_MAX_CHARS_IN_LIVESTREAM_COMMENT : FF_MAX_CHARS_IN_COMMENT} + textAreaMaxLength={FF_MAX_CHARS_IN_COMMENT} /> {isSupportComment && ( ), - [ICONS.LIVESTREAM]: (props: CustomProps) => ( - - - - - - - - - - - - - - - {/* }//fill="#FFFFFF" */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ), - [ICONS.LIVESTREAM_SOLID]: (props: CustomProps) => ( - - - - - - - - - - - - - - - - - - - - ), - [ICONS.LIVESTREAM_MONOCHROME]: (props: CustomProps) => ( - - - - - - - - - - - - - - - - - - - ), - - [ICONS.LIVESTREAM]: (props: CustomProps) => ( - - - - - - - - - - - - - - - {/* }//fill="#FFFFFF" */} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ), - [ICONS.LIVESTREAM_SOLID]: (props: CustomProps) => ( - - - - - - - - - - - - - - - - - - - - ), - [ICONS.LIVESTREAM_MONOCHROME]: (props: CustomProps) => ( - - - - - - - - - - - - - - - - - - - ), [ICONS.STACK]: (props: CustomProps) => ( ({ renderMode: makeSelectFileRenderModeForUri(props.uri)(state), costInfo: makeSelectCostInfoForUri(props.uri)(state), myChannels: selectMyChannelClaims(state), - isLivestreamClaim: makeSelectClaimIsStreamPlaceholder(props.uri)(state), reactionsDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state), streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state), }); diff --git a/ui/component/fileActions/view.jsx b/ui/component/fileActions/view.jsx index c7656316b..303737bfa 100644 --- a/ui/component/fileActions/view.jsx +++ b/ui/component/fileActions/view.jsx @@ -30,7 +30,6 @@ type Props = { doToast: ({ message: string }) => void, clearPlayingUri: () => void, hideRepost?: boolean, - isLivestreamClaim: boolean, reactionsDisabled: boolean, download: (string) => void, streamingUrl: ?string, @@ -50,7 +49,6 @@ function FileActions(props: Props) { clearPlayingUri, doToast, hideRepost, - isLivestreamClaim, reactionsDisabled, } = props; const { @@ -96,7 +94,7 @@ function FileActions(props: Props) { const lhsSection = ( <> - {ENABLE_FILE_REACTIONS && !reactionsDisabled && } + {ENABLE_FILE_REACTIONS && !reactionsDisabled && } {!hideRepost && ( @@ -124,14 +122,12 @@ function FileActions(props: Props) { const rhsSection = ( <> - {/* @if TARGET='app' */} - {/* @endif */} {claimIsMine && ( - {!claimIsMine && ( - push(`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`)} - > -
    - - {__('Report content')} -
    -
    - )} + push(`/$/${PAGES.REPORT_CONTENT}?claimId=${claimId}`)} + > +
    + + {__('Report content')} +
    +
    )} diff --git a/ui/component/fileReactions/view.jsx b/ui/component/fileReactions/view.jsx index 048c3daba..a07534bfd 100644 --- a/ui/component/fileReactions/view.jsx +++ b/ui/component/fileReactions/view.jsx @@ -16,7 +16,6 @@ type Props = { likeCount: number, dislikeCount: number, myReaction: ?string, - livestream?: boolean, }; function FileReactions(props: Props) { @@ -29,7 +28,6 @@ function FileReactions(props: Props) { myReaction, likeCount, dislikeCount, - livestream, } = props; const claimId = claim && claim.claim_id; @@ -42,21 +40,10 @@ function FileReactions(props: Props) { doFetchReactions(claimId); } - let fetchInterval; if (claimId) { fetchReactions(); - - if (livestream) { - fetchInterval = setInterval(fetchReactions, 45000); - } } - - return () => { - if (fetchInterval) { - clearInterval(fetchInterval); - } - }; - }, [claimId, doFetchReactions, livestream]); + }, [claimId, doFetchReactions]); return ( <> @@ -98,7 +85,9 @@ function FileReactions(props: Props) { requiresAuth={IS_WEB} authSrc={'filereaction_dislike'} title={__('I dislike this')} - className={classnames('button--file-action', { 'button--file-action-active': myReaction === REACTION_TYPES.DISLIKE })} + className={classnames('button--file-action', { + 'button--file-action-active': myReaction === REACTION_TYPES.DISLIKE, + })} label={<>{formatNumberWithCommas(dislikeCount, 0)}} iconSize={18} icon={dislikeIcon} diff --git a/ui/component/fileSubtitle/view.jsx b/ui/component/fileSubtitle/view.jsx index 60f9c489c..781cdfe46 100644 --- a/ui/component/fileSubtitle/view.jsx +++ b/ui/component/fileSubtitle/view.jsx @@ -1,28 +1,22 @@ // @flow import React from 'react'; -import DateTime from 'component/dateTime'; import FileViewCount from 'component/fileViewCount'; import FileActions from 'component/fileActions'; type Props = { uri: string, - livestream?: boolean, - activeViewers?: number, - isLive?: boolean, }; function FileSubtitle(props: Props) { - const { uri, livestream = false, activeViewers, isLive = false } = props; + const { uri } = props; return (
    - {livestream ? {__('Right now')} : } - - +
    - +
    ); } diff --git a/ui/component/fileTitleSection/index.js b/ui/component/fileTitleSection/index.js index fa5be5a0a..0e9f3a4f9 100644 --- a/ui/component/fileTitleSection/index.js +++ b/ui/component/fileTitleSection/index.js @@ -2,18 +2,15 @@ import { connect } from 'react-redux'; import { doFetchSubCount, makeSelectSubCountForUri } from 'lbryinc'; import { makeSelectTitleForUri, makeSelectClaimForUri } from 'redux/selectors/claims'; import { makeSelectInsufficientCreditsForUri } from 'redux/selectors/content'; -import { makeSelectViewersForId } from 'redux/selectors/livestream'; import FileTitleSection from './view'; const select = (state, props) => { const claim = makeSelectClaimForUri(props.uri)(state); - const viewers = claim && makeSelectViewersForId(claim.claim_id)(state); const channelClaimId = claim && claim.signing_channel ? claim.signing_channel.claim_id : undefined; const channelUri = claim && claim.signing_channel ? claim.signing_channel.canonical_url : undefined; const subCount = channelUri && makeSelectSubCountForUri(channelUri)(state); return { - viewers, isInsufficientCredits: makeSelectInsufficientCreditsForUri(props.uri)(state), title: makeSelectTitleForUri(props.uri)(state), channelClaimId, diff --git a/ui/component/fileTitleSection/view.jsx b/ui/component/fileTitleSection/view.jsx index a6db551ee..45665434c 100644 --- a/ui/component/fileTitleSection/view.jsx +++ b/ui/component/fileTitleSection/view.jsx @@ -20,27 +20,13 @@ type Props = { title: string, nsfw: boolean, isNsfwBlocked: boolean, - livestream?: boolean, - isLive?: boolean, - viewers?: number, subCount: number, channelClaimId?: string, fetchSubCount: (string) => void, }; function FileTitleSection(props: Props) { - const { - title, - uri, - nsfw, - isNsfwBlocked, - livestream = false, - isLive = false, - viewers, - subCount, - channelClaimId, - fetchSubCount, - } = props; + const { title, uri, nsfw, isNsfwBlocked, subCount, channelClaimId, fetchSubCount } = props; const [hasAcknowledgedSec, setHasAcknowledgedSec] = usePersistedState('sec-nag', false); React.useEffect(() => { @@ -78,7 +64,7 @@ function FileTitleSection(props: Props) { body={ - + } actions={ diff --git a/ui/component/fileType/index.js b/ui/component/fileType/index.js index 67e40411b..7baca94ea 100644 --- a/ui/component/fileType/index.js +++ b/ui/component/fileType/index.js @@ -1,11 +1,9 @@ import { connect } from 'react-redux'; import { makeSelectMediaTypeForUri } from 'redux/selectors/file_info'; -import { makeSelectClaimIsStreamPlaceholder } from 'redux/selectors/claims'; import FileType from './view'; const select = (state, props) => ({ mediaType: makeSelectMediaTypeForUri(props.uri)(state), - isLivestream: makeSelectClaimIsStreamPlaceholder(props.uri)(state), }); export default connect(select)(FileType); diff --git a/ui/component/fileType/view.jsx b/ui/component/fileType/view.jsx index 9f15484ec..f99edb6bc 100644 --- a/ui/component/fileType/view.jsx +++ b/ui/component/fileType/view.jsx @@ -7,19 +7,18 @@ import * as COL from 'constants/collections'; type Props = { uri: string, mediaType: string, - isLivestream: boolean, small: boolean, }; function FileType(props: Props) { - const { mediaType, isLivestream, small } = props; + const { mediaType, small } = props; const size = small ? COL.ICON_SIZE : undefined; if (mediaType === 'image') { return ; } else if (mediaType === 'audio') { return ; - } else if (mediaType === 'video' || isLivestream) { + } else if (mediaType === 'video') { return ; } else if (mediaType === 'text') { return ; diff --git a/ui/component/fileViewCount/view.jsx b/ui/component/fileViewCount/view.jsx index cdfbafe33..9feeaba05 100644 --- a/ui/component/fileViewCount/view.jsx +++ b/ui/component/fileViewCount/view.jsx @@ -8,24 +8,12 @@ type Props = { fetchingViewCount: boolean, uri: string, viewCount: string, - livestream?: boolean, - activeViewers?: number, - isLive?: boolean, - doAnalyticsView: (string) => void, }; function FileViewCount(props: Props) { - const { claim, uri, fetchViewCount, viewCount, livestream, activeViewers, doAnalyticsView } = props; + const { claim, uri, fetchViewCount, viewCount } = props; const claimId = claim && claim.claim_id; - React.useEffect(() => { - if (livestream) { - // Regular claims will call the file/view event when a user actually watches the claim - // This can be removed when we get rid of the livestream iframe - doAnalyticsView(uri); - } - }, [livestream, doAnalyticsView, uri]); - React.useEffect(() => { if (claimId) { fetchViewCount(claimId); @@ -36,9 +24,7 @@ function FileViewCount(props: Props) { return ( - {!livestream && - activeViewers === undefined && - (viewCount !== 1 ? __('%view_count% views', { view_count: formattedViewCount }) : __('1 view'))} + {viewCount !== 1 ? __('%view_count% views', { view_count: formattedViewCount }) : __('1 view')} {} ); diff --git a/ui/component/fileViewCountInline/view.jsx b/ui/component/fileViewCountInline/view.jsx index 640cababf..fd1f366cb 100644 --- a/ui/component/fileViewCountInline/view.jsx +++ b/ui/component/fileViewCountInline/view.jsx @@ -4,7 +4,6 @@ import 'scss/component/_view_count.scss'; type Props = { uri: string, - isLivestream?: boolean, // --- select --- claim: ?StreamClaim, viewCount: string, @@ -12,7 +11,7 @@ type Props = { }; export default function FileViewCountInline(props: Props) { - const { isLivestream, claim, viewCount, lang } = props; + const { claim, viewCount, lang } = props; let formattedViewCount; try { @@ -30,8 +29,8 @@ export default function FileViewCountInline(props: Props) { // clean up (only one place edit/remove). const isChannelPage = window.location.pathname.startsWith('/@'); - // dont show if no view count, if it's a repost, a livestream or isn't a channel page - if (!viewCount || (claim && claim.repost_url) || isLivestream || !isChannelPage) { + // dont show if no view count, if it's a repost or isn't a channel page + if (!viewCount || (claim && claim.repost_url) || !isChannelPage) { // (1) Currently, makeSelectViewCountForUri doesn't differentiate between // un-fetched view-count vs zero view-count. But since it's probably not // ideal to highlight that a view has 0 count, let's just not show anything. diff --git a/ui/component/header/index.js b/ui/component/header/index.js index a7c7bf21e..1584630d3 100644 --- a/ui/component/header/index.js +++ b/ui/component/header/index.js @@ -9,7 +9,7 @@ import { doClearEmailEntry, doClearPasswordEntry } from 'redux/actions/user'; import { doSetClientSetting } from 'redux/actions/settings'; import { doSignOut, doOpenModal } from 'redux/actions/app'; import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings'; -import { selectHasNavigated, selectActiveChannelClaim, selectActiveChannelStakedLevel } from 'redux/selectors/app'; +import { selectHasNavigated, selectActiveChannelClaim } from 'redux/selectors/app'; import Header from './view'; const select = (state) => ({ @@ -27,7 +27,6 @@ const select = (state) => ({ hasNavigated: selectHasNavigated(state), user: selectUser(state), activeChannelClaim: selectActiveChannelClaim(state), - activeChannelStakedLevel: selectActiveChannelStakedLevel(state), }); const perform = (dispatch) => ({ diff --git a/ui/component/header/view.jsx b/ui/component/header/view.jsx index a94703bba..cfedb816a 100644 --- a/ui/component/header/view.jsx +++ b/ui/component/header/view.jsx @@ -1,5 +1,5 @@ // @flow -import { ENABLE_NO_SOURCE_CLAIMS, CHANNEL_STAKED_LEVEL_LIVESTREAM, ENABLE_UI_NOTIFICATIONS } from 'config'; +import { ENABLE_UI_NOTIFICATIONS } from 'config'; import * as ICONS from 'constants/icons'; import * as SETTINGS from 'constants/settings'; import * as PAGES from 'constants/pages'; @@ -63,7 +63,6 @@ type Props = { isAbsoluteSideNavHidden: boolean, hideCancel: boolean, activeChannelClaim: ?ChannelClaim, - activeChannelStakedLevel: number, }; const Header = (props: Props) => { @@ -92,7 +91,6 @@ const Header = (props: Props) => { hideCancel, user, activeChannelClaim, - activeChannelStakedLevel, } = props; const isMobile = useIsMobile(); // on the verify page don't let anyone escape other than by closing the tab to keep session data consistent @@ -103,12 +101,6 @@ const Header = (props: Props) => { const hasBackout = Boolean(backout); const { backLabel, backNavDefault, title: backTitle, simpleTitle: simpleBackTitle } = backout || {}; const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui); - const livestreamEnabled = Boolean( - ENABLE_NO_SOURCE_CLAIMS && - user && - !user.odysee_live_disabled && - (activeChannelStakedLevel >= CHANNEL_STAKED_LEVEL_LIVESTREAM || user.odysee_live_enabled) - ); const activeChannelUrl = activeChannelClaim && activeChannelClaim.permanent_url; // Sign out if they click the "x" when they are on the password prompt @@ -288,7 +280,6 @@ const Header = (props: Props) => { history={history} handleThemeToggle={handleThemeToggle} currentTheme={currentTheme} - livestreamEnabled={livestreamEnabled} />
    )} @@ -405,11 +396,10 @@ type HeaderMenuButtonProps = { history: { push: (string) => void }, handleThemeToggle: (string) => void, currentTheme: string, - livestreamEnabled: boolean, }; function HeaderMenuButtons(props: HeaderMenuButtonProps) { - const { authenticated, notificationsEnabled, history, handleThemeToggle, currentTheme, livestreamEnabled } = props; + const { authenticated, notificationsEnabled, history, handleThemeToggle, currentTheme } = props; return (
    @@ -437,18 +427,6 @@ function HeaderMenuButtons(props: HeaderMenuButtonProps) { {__('New Channel')} - {/* @if TARGET='web' */} - history.push(`/$/${PAGES.YOUTUBE_SYNC}`)}> - - {__('Sync YouTube Channel')} - - {/* @endif */} - {livestreamEnabled && ( - history.push(`/$/${PAGES.LIVESTREAM}`)}> - - {__('Go Live')} - - )} )} diff --git a/ui/component/livestreamComment/index.js b/ui/component/livestreamComment/index.js deleted file mode 100644 index 8c6a97de5..000000000 --- a/ui/component/livestreamComment/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import { connect } from 'react-redux'; -import { makeSelectStakedLevelForChannelUri, makeSelectClaimForUri } from 'redux/selectors/claims'; -import LivestreamComment from './view'; - -const select = (state, props) => ({ - claim: makeSelectClaimForUri(props.uri)(state), - stakedLevel: makeSelectStakedLevelForChannelUri(props.authorUri)(state), -}); - -export default connect(select)(LivestreamComment); diff --git a/ui/component/livestreamComment/view.jsx b/ui/component/livestreamComment/view.jsx deleted file mode 100644 index 49dd26f95..000000000 --- a/ui/component/livestreamComment/view.jsx +++ /dev/null @@ -1,133 +0,0 @@ -// @flow -import * as ICONS from 'constants/icons'; -import React from 'react'; -import { parseURI } from 'util/lbryURI'; -import MarkdownPreview from 'component/common/markdown-preview'; -import Tooltip from 'component/common/tooltip'; -import ChannelThumbnail from 'component/channelThumbnail'; -import { Menu, MenuButton } from '@reach/menu-button'; -import Icon from 'component/common/icon'; -import classnames from 'classnames'; -import CommentMenuList from 'component/commentMenuList'; -import Button from 'component/button'; -import CreditAmount from 'component/common/credit-amount'; - -type Props = { - uri: string, - claim: StreamClaim, - authorUri: string, - commentId: string, - message: string, - commentIsMine: boolean, - stakedLevel: number, - supportAmount: number, - isModerator: boolean, - isGlobalMod: boolean, - isFiat: boolean, - isPinned: boolean, -}; - -function LivestreamComment(props: Props) { - const { - claim, - uri, - authorUri, - message, - commentIsMine, - commentId, - stakedLevel, - supportAmount, - isModerator, - isGlobalMod, - isFiat, - isPinned, - } = props; - - const commentByOwnerOfContent = claim && claim.signing_channel && claim.signing_channel.permanent_url === authorUri; - const { claimName } = parseURI(authorUri); - - return ( -
  • 0, - })} - > - {supportAmount > 0 && ( -
    -
    - -
    - )} - -
    - {supportAmount > 0 && } -
    - {isGlobalMod && ( - - - - - - )} - - {isModerator && ( - - - - - - )} - - {commentByOwnerOfContent && ( - - - - - - )} - - - - {isPinned && ( - - - {__('Pinned')} - - )} - -
    - -
    -
    -
    - -
    - - - - - 0} - /> - -
    -
  • - ); -} - -export default LivestreamComment; diff --git a/ui/component/livestreamComments/index.js b/ui/component/livestreamComments/index.js deleted file mode 100644 index f68fc3372..000000000 --- a/ui/component/livestreamComments/index.js +++ /dev/null @@ -1,29 +0,0 @@ -import { connect } from 'react-redux'; -import { makeSelectClaimForUri, selectMyChannelClaims } from 'redux/selectors/claims'; -import { doCommentSocketConnect, doCommentSocketDisconnect } from 'redux/actions/websocket'; -import { doCommentList, doSuperChatList } from 'redux/actions/comments'; -import { - makeSelectTopLevelCommentsForUri, - selectIsFetchingComments, - makeSelectSuperChatsForUri, - makeSelectSuperChatTotalAmountForUri, - makeSelectPinnedCommentsForUri, -} from 'redux/selectors/comments'; -import LivestreamComments from './view'; - -const select = (state, props) => ({ - claim: makeSelectClaimForUri(props.uri)(state), - comments: makeSelectTopLevelCommentsForUri(props.uri)(state).slice(0, 75), - pinnedComments: makeSelectPinnedCommentsForUri(props.uri)(state), - fetchingComments: selectIsFetchingComments(state), - superChats: makeSelectSuperChatsForUri(props.uri)(state), - superChatsTotalAmount: makeSelectSuperChatTotalAmountForUri(props.uri)(state), - myChannels: selectMyChannelClaims(state), -}); - -export default connect(select, { - doCommentSocketConnect, - doCommentSocketDisconnect, - doCommentList, - doSuperChatList, -})(LivestreamComments); diff --git a/ui/component/livestreamComments/view.jsx b/ui/component/livestreamComments/view.jsx deleted file mode 100644 index a9db254de..000000000 --- a/ui/component/livestreamComments/view.jsx +++ /dev/null @@ -1,319 +0,0 @@ -// @flow -import React from 'react'; -import classnames from 'classnames'; -import Spinner from 'component/spinner'; -import CommentCreate from 'component/commentCreate'; -import LivestreamComment from 'component/livestreamComment'; -import Button from 'component/button'; -import UriIndicator from 'component/uriIndicator'; -import CreditAmount from 'component/common/credit-amount'; -import ChannelThumbnail from 'component/channelThumbnail'; -import Tooltip from 'component/common/tooltip'; -import * as ICONS from 'constants/icons'; - -type Props = { - uri: string, - claim: ?StreamClaim, - activeViewers: number, - embed?: boolean, - doCommentSocketConnect: (string, string) => void, - doCommentSocketDisconnect: (string) => void, - doCommentList: (string, string, number, number) => void, - comments: Array, - pinnedComments: Array, - fetchingComments: boolean, - doSuperChatList: (string) => void, - superChats: Array, - myChannels: ?Array, -}; - -const VIEW_MODE_CHAT = 'view_chat'; -const VIEW_MODE_SUPER_CHAT = 'view_superchat'; -const COMMENT_SCROLL_TIMEOUT = 25; - -export default function LivestreamComments(props: Props) { - const { - claim, - uri, - embed, - doCommentSocketConnect, - doCommentSocketDisconnect, - comments: commentsByChronologicalOrder, - pinnedComments, - doCommentList, - fetchingComments, - doSuperChatList, - myChannels, - superChats: superChatsByTipAmount, - } = props; - - let superChatsFiatAmount, superChatsTotalAmount; - - const commentsRef = React.createRef(); - const [viewMode, setViewMode] = React.useState(VIEW_MODE_CHAT); - const [scrollPos, setScrollPos] = React.useState(0); - const [showPinned, setShowPinned] = React.useState(true); - const claimId = claim && claim.claim_id; - const commentsLength = commentsByChronologicalOrder && commentsByChronologicalOrder.length; - - // which kind of superchat to display, either - const commentsToDisplay = viewMode === VIEW_MODE_CHAT ? commentsByChronologicalOrder : superChatsByTipAmount; - - const discussionElement = document.querySelector('.livestream__comments'); - - const pinnedComment = pinnedComments.length > 0 ? pinnedComments[0] : null; - - function restoreScrollPos() { - if (discussionElement) { - discussionElement.scrollTop = 0; - } - } - - React.useEffect(() => { - if (claimId) { - doCommentList(uri, '', 1, 75); - doSuperChatList(uri); - doCommentSocketConnect(uri, claimId); - } - - return () => { - if (claimId) { - doCommentSocketDisconnect(claimId); - } - }; - }, [claimId, uri, doCommentList, doSuperChatList, doCommentSocketConnect, doCommentSocketDisconnect]); - - // Register scroll handler (TODO: Should throttle/debounce) - React.useEffect(() => { - function handleScroll() { - if (discussionElement) { - const scrollTop = discussionElement.scrollTop; - if (scrollTop !== scrollPos) { - setScrollPos(scrollTop); - } - } - } - - if (discussionElement) { - discussionElement.addEventListener('scroll', handleScroll); - return () => discussionElement.removeEventListener('scroll', handleScroll); - } - }, [discussionElement, scrollPos]); - - // Retain scrollPos=0 when receiving new messages. - React.useEffect(() => { - if (discussionElement && commentsLength > 0) { - // Only update comment scroll if the user hasn't scrolled up to view old comments - if (scrollPos >= 0) { - // +ve scrollPos: not scrolled (Usually, there'll be a few pixels beyond 0). - // -ve scrollPos: user scrolled. - const timer = setTimeout(() => { - // Use a timer here to ensure we reset after the new comment has been rendered. - discussionElement.scrollTop = 0; - }, COMMENT_SCROLL_TIMEOUT); - return () => clearTimeout(timer); - } - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [commentsLength]); // (Just respond to 'commentsLength' updates and nothing else) - - // sum total amounts for fiat tips and lbc tips - if (superChatsByTipAmount) { - let fiatAmount = 0; - let LBCAmount = 0; - for (const superChat of superChatsByTipAmount) { - if (superChat.is_fiat) { - fiatAmount = fiatAmount + superChat.support_amount; - } else { - LBCAmount = LBCAmount + superChat.support_amount; - } - } - - superChatsFiatAmount = fiatAmount; - superChatsTotalAmount = LBCAmount; - } - - let superChatsReversed; - // array of superchats organized by fiat or not first, then support amount - if (superChatsByTipAmount) { - const clonedSuperchats = JSON.parse(JSON.stringify(superChatsByTipAmount)); - - // for top to bottom display, oldest superchat on top most recent on bottom - superChatsReversed = clonedSuperchats - .sort((a, b) => { - return b.timestamp - a.timestamp; - }); } - - // todo: implement comment_list --mine in SDK so redux can grab with selectCommentIsMine - function isMyComment(channelId: string) { - if (myChannels != null && channelId != null) { - for (let i = 0; i < myChannels.length; i++) { - if (myChannels[i].claim_id === channelId) { - return true; - } - } - } - return false; - } - - if (!claim) { - return null; - } - - return ( -
    -
    -
    {__('Live discussion')}
    - {(superChatsTotalAmount || 0) > 0 && ( -
    - {/* the superchats in chronological order button */} -
    - )} -
    - <> - {fetchingComments && !commentsByChronologicalOrder && ( -
    - -
    - )} -
    - {viewMode === VIEW_MODE_CHAT && superChatsByTipAmount && (superChatsTotalAmount || 0) > 0 && ( -
    -
    - {superChatsByTipAmount.map((superChat: Comment) => ( - -
    -
    - -
    - -
    - - -
    -
    -
    - ))} -
    -
    - )} - - {pinnedComment && showPinned && viewMode === VIEW_MODE_CHAT && ( -
    - -
    - )} - - {/* top to bottom comment display */} - {!fetchingComments && commentsByChronologicalOrder.length > 0 ? ( -
    - {viewMode === VIEW_MODE_CHAT && - commentsToDisplay.map((comment) => ( - - ))} - - {/* listing comments on top of eachother */} - {viewMode === VIEW_MODE_SUPER_CHAT && - superChatsReversed && - superChatsReversed.map((comment) => ( - - ))} -
    - ) : ( -
    - )} - - {scrollPos < 0 && viewMode === VIEW_MODE_CHAT && ( -
    - -
    - ); -} diff --git a/ui/component/livestreamLayout/index.js b/ui/component/livestreamLayout/index.js deleted file mode 100644 index 03547a34d..000000000 --- a/ui/component/livestreamLayout/index.js +++ /dev/null @@ -1,16 +0,0 @@ -import { connect } from 'react-redux'; -import { - makeSelectClaimForUri, - makeSelectTagInClaimOrChannelForUri, - makeSelectThumbnailForUri, -} from 'redux/selectors/claims'; -import LivestreamLayout from './view'; -import { DISABLE_COMMENTS_TAG } from 'constants/tags'; - -const select = (state, props) => ({ - claim: makeSelectClaimForUri(props.uri)(state), - thumbnail: makeSelectThumbnailForUri(props.uri)(state), - chatDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state), -}); - -export default connect(select)(LivestreamLayout); diff --git a/ui/component/livestreamLayout/view.jsx b/ui/component/livestreamLayout/view.jsx deleted file mode 100644 index 2a1c5e9ca..000000000 --- a/ui/component/livestreamLayout/view.jsx +++ /dev/null @@ -1,63 +0,0 @@ -// @flow -import { LIVESTREAM_EMBED_URL } from 'constants/livestream'; -import React from 'react'; -import FileTitleSection from 'component/fileTitleSection'; -import LivestreamComments from 'component/livestreamComments'; -import { useIsMobile } from 'effects/use-screensize'; - -type Props = { - uri: string, - claim: ?StreamClaim, - isLive: boolean, - chatDisabled: boolean, -}; - -export default function LivestreamLayout(props: Props) { - const { claim, uri, isLive, chatDisabled } = props; - const isMobile = useIsMobile(); - - if (!claim || !claim.signing_channel) { - return null; - } - - const channelName = claim.signing_channel.name; - const channelClaimId = claim.signing_channel.claim_id; - - return ( - <> -
    -
    -
    -