diff --git a/flow-typed/homepage.js b/flow-typed/homepage.js index a2bbeb7b7..ee4b1226f 100644 --- a/flow-typed/homepage.js +++ b/flow-typed/homepage.js @@ -4,12 +4,12 @@ declare type HomepageObject = { options: any, route: string, title: string, -} +}; declare type HomepageData = { [string]: HomepageObject, default: any => any, -} +}; declare type RowDataItem = { title: any, @@ -19,6 +19,7 @@ declare type RowDataItem = { extra?: any, options?: { channelIds?: Array, + limitClaimsPerChannel?: number, pageSize: number, }, route?: string, diff --git a/package.json b/package.json index 9f2ad5ba8..b008eeb8c 100644 --- a/package.json +++ b/package.json @@ -210,7 +210,7 @@ "unist-util-visit": "^2.0.3", "uuid": "^8.3.2", "vast-client": "^3.1.1", - "video.js": "^7.13.3", + "video.js": "^7.10.1", "videojs-contrib-quality-levels": "^2.0.9", "videojs-event-tracking": "^1.0.1", "villain-react": "^1.0.9", diff --git a/ui/component/channelContent/view.jsx b/ui/component/channelContent/view.jsx index 2ff48cb50..4425e0e24 100644 --- a/ui/component/channelContent/view.jsx +++ b/ui/component/channelContent/view.jsx @@ -1,5 +1,5 @@ // @flow -import { SHOW_ADS } from 'config'; +import { SHOW_ADS, ENABLE_NO_SOURCE_CLAIMS } from 'config'; import * as CS from 'constants/claim_search'; import * as ICONS from 'constants/icons'; import React, { Fragment } from 'react'; @@ -136,6 +136,7 @@ function ChannelContent(props: Props) { {!channelIsMine && claimsInChannel > 0 && } ))} {!timedOut && urisLength === 0 && !loading &&
{empty || noResultMsg}
} @@ -198,7 +198,7 @@ export default function ClaimList(props: Props) { showUserBlocked={showHiddenByUser} showHiddenByUser={showHiddenByUser} collectionId={collectionId} - hideLivestreamClaims={hideLivestreamClaims} + showNoSourceClaims={showNoSourceClaims} customShouldHide={(claim: StreamClaim) => { // Hack to hide spee.ch thumbnail publishes // If it meets these requirements, it was probably uploaded here: diff --git a/ui/component/claimListDiscover/index.js b/ui/component/claimListDiscover/index.js index db5d76259..49c48fb7b 100644 --- a/ui/component/claimListDiscover/index.js +++ b/ui/component/claimListDiscover/index.js @@ -12,6 +12,14 @@ import { doToggleTagFollowDesktop } from 'redux/actions/tags'; import { makeSelectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings'; import { selectModerationBlockList } from 'redux/selectors/comments'; import ClaimListDiscover from './view'; +import { createSelector } from 'reselect'; + +const selectState = state => state.claims || {}; + +export const selectClaimsById = createSelector( + selectState, + state => state.byId || {} +); const select = (state) => ({ followedTags: selectFollowedTags(state), diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index e76334dd3..78b5cebd8 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -72,6 +72,7 @@ type Props = { liveLivestreamsFirst?: boolean, livestreamMap?: { [string]: any }, hasSource?: boolean, + showNoSourceClaims?: boolean, isChannel?: boolean, empty?: string, }; @@ -129,6 +130,7 @@ function ClaimListDiscover(props: Props) { livestreamMap, hasSource, isChannel = false, + showNoSourceClaims, empty, } = props; const didNavigateForward = history.action === 'PUSH'; @@ -512,6 +514,7 @@ function ClaimListDiscover(props: Props) { liveLivestreamsFirst={liveLivestreamsFirst} livestreamMap={livestreamMap} searchOptions={options} + showNoSourceClaims={showNoSourceClaims} empty={empty} /> {loading && ( @@ -546,6 +549,7 @@ function ClaimListDiscover(props: Props) { liveLivestreamsFirst={liveLivestreamsFirst} livestreamMap={livestreamMap} searchOptions={options} + showNoSourceClaims={showNoSourceClaims} empty={empty} /> {loading && diff --git a/ui/component/claimPreviewTile/view.jsx b/ui/component/claimPreviewTile/view.jsx index 810cd1fa9..fdf4c3a1a 100644 --- a/ui/component/claimPreviewTile/view.jsx +++ b/ui/component/claimPreviewTile/view.jsx @@ -44,6 +44,8 @@ type Props = { properties?: (Claim) => void, live?: boolean, collectionId?: string, + showNoSourceClaims?: boolean, + isLivestream: boolean, }; function ClaimPreviewTile(props: Props) { @@ -66,6 +68,8 @@ function ClaimPreviewTile(props: Props) { showHiddenByUser, properties, live, + showNoSourceClaims, + isLivestream, collectionId, } = props; const isRepost = claim && claim.repost_channel_url; @@ -149,7 +153,7 @@ function ClaimPreviewTile(props: Props) { shouldHide = blockedChannelUris.some((blockedUri) => blockedUri === claim.permanent_url); } - if (shouldHide) { + if (shouldHide || (isLivestream && !showNoSourceClaims)) { return null; } diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index fa5224ef2..7770e5ae4 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -37,7 +37,7 @@ export function prioritizeActiveLivestreams( // for that channel actually point to the same source). // 2. 'liveChannelIds' needs to be pruned after being accounted for, // otherwise all livestream-claims will be "live" (we'll only take the - // latest one as "live"). + // latest one as "live" ). return ( claim && claim.value_type === 'stream' && @@ -145,7 +145,7 @@ function ClaimTilesDiscover(props: Props) { mutedUris, liveLivestreamsFirst, livestreamMap, - // pin, + // pin, // let's pin from /web folder prefixUris, } = props; @@ -240,7 +240,7 @@ function ClaimTilesDiscover(props: Props) { const isLoading = fetchingClaimSearchByQuery[mainSearchKey]; - if (liveLivestreamsFirst && livestreamMap) { + if (liveLivestreamsFirst && livestreamMap && !isLoading) { prioritizeActiveLivestreams(uris, liveUris, livestreamMap, claimsByUri, claimSearchByQuery, options); } diff --git a/ui/component/selectThumbnail/view.jsx b/ui/component/selectThumbnail/view.jsx index dcda827f2..ca8ed5a28 100644 --- a/ui/component/selectThumbnail/view.jsx +++ b/ui/component/selectThumbnail/view.jsx @@ -123,7 +123,7 @@ class SelectThumbnail extends React.PureComponent { openModal(MODALS.CONFIRM_THUMBNAIL_UPLOAD, { file })} /> diff --git a/ui/component/sideNavigation/view.jsx b/ui/component/sideNavigation/view.jsx index 7d4cdc9a3..14acaf966 100644 --- a/ui/component/sideNavigation/view.jsx +++ b/ui/component/sideNavigation/view.jsx @@ -9,7 +9,7 @@ import Icon from 'component/common/icon'; import NotificationBubble from 'component/notificationBubble'; import I18nMessage from 'component/i18nMessage'; import ChannelThumbnail from 'component/channelThumbnail'; -import { PINNED_LABEL_1, PINNED_URI_1, PINNED_URI_2, PINNED_LABEL_2, SIMPLE_SITE, DOMAIN } from 'config'; +import { PINNED_LABEL_1, PINNED_URI_1, PINNED_URI_2, PINNED_LABEL_2, SIMPLE_SITE, DOMAIN, ENABLE_UI_NOTIFICATIONS } from 'config'; // @if TARGET='app' import { IS_MAC } from 'component/app/view'; // @endif @@ -213,7 +213,7 @@ function SideNavigation(props: Props) { }); } - const notificationsEnabled = user && user.experimental_ui; + const notificationsEnabled = ENABLE_UI_NOTIFICATIONS || (user && user.experimental_ui); const isAuthenticated = Boolean(email); // SIDE LINKS: FOLLOWING, HOME, [FULL,] [EXTRA] let SIDE_LINKS: Array = []; diff --git a/ui/component/subscribeButton/index.js b/ui/component/subscribeButton/index.js index b44b8584b..52ea92e5e 100644 --- a/ui/component/subscribeButton/index.js +++ b/ui/component/subscribeButton/index.js @@ -6,8 +6,8 @@ import { makeSelectNotificationsDisabled, } from 'redux/selectors/subscriptions'; import { makeSelectPermanentUrlForUri } from 'lbry-redux'; -import { doToast } from 'redux/actions/notifications'; import { selectUser } from 'redux/selectors/user'; +import { doToast } from 'redux/actions/notifications'; import SubscribeButton from './view'; const select = (state, props) => ({ diff --git a/ui/modal/modalRemoveFile/view.jsx b/ui/modal/modalRemoveFile/view.jsx index 38bdba168..329e7821f 100644 --- a/ui/modal/modalRemoveFile/view.jsx +++ b/ui/modal/modalRemoveFile/view.jsx @@ -32,7 +32,7 @@ function ModalRemoveFile(props: Props) { title={__('Remove File')} subtitle={ {`"${title}"`} }}> - Are you sure you'd like to remove %title%? + Are you sure you'd like to remove %title% from LBRY? } body={ @@ -55,7 +55,7 @@ function ModalRemoveFile(props: Props) { }} > - Remove from blockchain (%lbc%) + Abandon on blockchain (%lbc%) } type="checkbox" @@ -63,7 +63,7 @@ function ModalRemoveFile(props: Props) { onChange={() => setAbandonChecked(!abandonChecked)} /> {abandonChecked === true && ( -

{__('This action is permanent and cannot be undone')}

+

{__('This action is permanent and cannot be undone.')}

)} {/* @if TARGET='app' */} @@ -86,7 +86,7 @@ function ModalRemoveFile(props: Props) {