use ENABLE_MATURE for fileTitleSection

This commit is contained in:
zeppi 2021-07-06 14:29:38 -04:00 committed by jessopb
parent 9af3380af7
commit e2b8aae554

View file

@ -7,12 +7,13 @@ import FileSubtitle from 'component/fileSubtitle';
import ClaimAuthor from 'component/claimAuthor';
import Card from 'component/common/card';
import * as ICONS from 'constants/icons';
import * as PAGES from 'constants/pages';
import Icon from 'component/common/icon';
import I18nMessage from 'component/i18nMessage';
import Button from 'component/button';
import * as PAGES from 'constants/pages';
import FileDescription from 'component/fileDescription';
import usePersistedState from 'effects/use-persisted-state';
import { ENABLE_MATURE } from 'config';
type Props = {
uri: string,
@ -64,19 +65,45 @@ function FileTitleSection(props: Props) {
isNsfwBlocked ? (
<div className="main--empty">
<h2>
<Icon className="icon--hidden" icon={ICONS.EYE_OFF} />
{__('Mature content blocked.')}
{!ENABLE_MATURE && (
<>
<Icon className="icon--hidden" icon={ICONS.EYE_OFF} />
{__('Mature content is not supported.')}
</>
)}
{ENABLE_MATURE && (
<>
<Icon className="icon--hidden" icon={ICONS.EYE_OFF} />
{__('Mature content blocked.')}
</>
)}
</h2>
<div>
<I18nMessage
tokens={{
content_settings: (
<Button button="link" label={__('content settings')} navigate={`/$/${PAGES.SETTINGS}`} />
),
}}
>
Change this in your %content_settings%.
</I18nMessage>
{ENABLE_MATURE && (
<>
<I18nMessage
tokens={{
content_settings: (
<Button button="link" label={__('content settings')} navigate={`/$/${PAGES.SETTINGS}`} />
),
}}
>
Change this in your %content_settings%.
</I18nMessage>
</>
)}
{!ENABLE_MATURE && (
<>
<I18nMessage
tokens={{
download_url: <Button label={__('lbry.com')} button="link" href="https://lbry.com/get" />,
}}
>
You can download the LBRY Desktop or Android app on %download_url% and enable mature content in
Settings.
</I18nMessage>
</>
)}
</div>
</div>
) : (