From e2b8aae5549643c2c06725d439d12e7700382e9a Mon Sep 17 00:00:00 2001 From: zeppi Date: Tue, 6 Jul 2021 14:29:38 -0400 Subject: [PATCH] use ENABLE_MATURE for fileTitleSection --- ui/component/fileTitleSection/view.jsx | 51 ++++++++++++++++++++------ 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/ui/component/fileTitleSection/view.jsx b/ui/component/fileTitleSection/view.jsx index e2e06e038..eb4fa2e7a 100644 --- a/ui/component/fileTitleSection/view.jsx +++ b/ui/component/fileTitleSection/view.jsx @@ -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 ? (

- - {__('Mature content blocked.')} + {!ENABLE_MATURE && ( + <> + + {__('Mature content is not supported.')} + + )} + {ENABLE_MATURE && ( + <> + + {__('Mature content blocked.')} + + )}

- - ), - }} - > - Change this in your %content_settings%. - + {ENABLE_MATURE && ( + <> + + ), + }} + > + Change this in your %content_settings%. + + + )} + {!ENABLE_MATURE && ( + <> + , + }} + > + You can download the LBRY Desktop or Android app on %download_url% and enable mature content in + Settings. + + + )}
) : (