add yrbl to block page; dont do recsys plugin

This commit is contained in:
zeppi 2022-11-07 16:24:52 -05:00
parent 1d55a84c94
commit 871a933fb4
3 changed files with 47 additions and 33 deletions

View file

@ -2321,5 +2321,6 @@
"Autoplay Next is on.": "Autoplay Next is on.", "Autoplay Next is on.": "Autoplay Next is on.",
"Content Blocked": "Content Blocked", "Content Blocked": "Content Blocked",
"Your hub has blocked %content% because it subscribes to the following blocking channel:": "Your hub has blocked %content% because it subscribes to the following blocking channel:", "Your hub has blocked %content% because it subscribes to the following blocking channel:": "Your hub has blocked %content% because it subscribes to the following blocking channel:",
"Your hub has blocked %content% because it subscribes to %channel%. You can change your hub in %settings%.": "Your hub has blocked %content% because it subscribes to %channel%. You can change your hub in %settings%.",
"--end--": "--end--" "--end--": "--end--"
} }

View file

@ -9,7 +9,7 @@ import eventTracking from 'videojs-event-tracking';
import * as OVERLAY from './overlays'; import * as OVERLAY from './overlays';
import './plugins/videojs-mobile-ui/plugin'; import './plugins/videojs-mobile-ui/plugin';
import hlsQualitySelector from './plugins/videojs-hls-quality-selector/plugin'; import hlsQualitySelector from './plugins/videojs-hls-quality-selector/plugin';
import recsys from './plugins/videojs-recsys/plugin'; // import recsys from './plugins/videojs-recsys/plugin'; // points to view tracking plugin
import qualityLevels from 'videojs-contrib-quality-levels'; import qualityLevels from 'videojs-contrib-quality-levels';
import LbryVolumeBarClass from './lbry-volume-bar'; import LbryVolumeBarClass from './lbry-volume-bar';
import keyboardShorcuts from './videojs-keyboard-shortcuts'; import keyboardShorcuts from './videojs-keyboard-shortcuts';
@ -92,9 +92,9 @@ if (!Object.keys(videojs.getPlugins()).includes('qualityLevels')) {
videojs.registerPlugin('qualityLevels', qualityLevels); videojs.registerPlugin('qualityLevels', qualityLevels);
} }
if (!Object.keys(videojs.getPlugins()).includes('recsys')) { // if (!Object.keys(videojs.getPlugins()).includes('recsys')) {
videojs.registerPlugin('recsys', recsys); // videojs.registerPlugin('recsys', recsys);
} // }
// **************************************************************************** // ****************************************************************************
// VideoJs // VideoJs

View file

@ -1,12 +1,12 @@
// @flow // @flow
import * as PAGES from 'constants/pages'; import * as PAGES from 'constants/pages';
import I18nMessage from 'component/i18nMessage';
import React, { useEffect } from 'react'; import React, { useEffect } from 'react';
import { Redirect, useHistory } from 'react-router-dom'; import { Redirect, useHistory } from 'react-router-dom';
import Spinner from 'component/spinner'; import Spinner from 'component/spinner';
import ChannelPage from 'page/channel'; import ChannelPage from 'page/channel';
import Page from 'component/page'; import Page from 'component/page';
import Button from 'component/button'; import Button from 'component/button';
import Card from 'component/common/card';
import { formatLbryUrlForWeb } from 'util/url'; import { formatLbryUrlForWeb } from 'util/url';
import { parseURI } from 'util/lbryURI'; import { parseURI } from 'util/lbryURI';
import * as COLLECTIONS_CONSTS from 'constants/collections'; import * as COLLECTIONS_CONSTS from 'constants/collections';
@ -117,6 +117,7 @@ function ShowPage(props: Props) {
{!isResolvingUri && !isSubscribed && ( {!isResolvingUri && !isSubscribed && (
<div className="main--empty"> <div className="main--empty">
<Yrbl <Yrbl
type={'sad'}
title={isChannel ? __('Channel Not Found') : __('No Content Found')} title={isChannel ? __('Channel Not Found') : __('No Content Found')}
subtitle={ subtitle={
isChannel ? ( isChannel ? (
@ -147,8 +148,9 @@ function ShowPage(props: Props) {
} else if (isBlacklisted && !claimIsMine) { } else if (isBlacklisted && !claimIsMine) {
innerContent = isBlacklistedDueToDMCA ? ( innerContent = isBlacklistedDueToDMCA ? (
<Page> <Page>
<Card <div className="main--empty">
title={uri} <Yrbl
title={isChannel ? __('Channel Not Found') : __('No Content Found')}
subtitle={__( subtitle={__(
'Your hub has blocked access to this content do to a complaint received under the US Digital Millennium Copyright Act.' 'Your hub has blocked access to this content do to a complaint received under the US Digital Millennium Copyright Act.'
)} )}
@ -158,26 +160,37 @@ function ShowPage(props: Props) {
</div> </div>
} }
/> />
</div>
</Page> </Page>
) : ( ) : (
<Page> <Page>
<Card <div className="main--empty">
<Yrbl
type={'sad'}
title={__('Content Blocked')} title={__('Content Blocked')}
subtitle={ subtitle={
<> <div>
{errorCensor && <I18nMessage
__(`Your hub has blocked %content% because it subscribes to the following blocking channel:`, { tokens={{
content: uri, content: uri,
})}{' '} settings: <Button button="link" label={__('Settings')} navigate={`/$/${PAGES.SETTINGS}`} />,
channel: (
<Button <Button
button="link" button="link"
navigate={errorCensor && errorCensor.canonical_url} navigate={errorCensor && errorCensor.canonical_url}
label={errorCensor && errorCensor.name} label={errorCensor && errorCensor.name}
/> />
{errorCensor && <div className={'error__text'}>{`\nMessage:\n${errorCensor.text}\n`}</div>} ),
</> }}
>
Your hub has blocked %content% because it subscribes to %channel%. You can change your hub in
%settings%.
</I18nMessage>
{/* {errorCensor && <p>{`Message:\n${errorCensor.text}`}</p>} */}
</div>
} }
/> />
</div>
</Page> </Page>
); );
} else if (claim) { } else if (claim) {