Fixes to the adult content age-gating in moderaiton

This commit is contained in:
Paul Frazee
2024-03-09 15:27:09 -08:00
parent 0bd52704da
commit e0f93cb9e6
2 changed files with 85 additions and 111 deletions
+1 -3
View File
@@ -44,9 +44,7 @@ export function useGlobalLabelStrings(): GlobalLabelStrings {
},
'graphic-media': {
name: _(msg`Graphic Media`),
description: _(
msg`Explicit or potentially disturbing media, including graphic violence, severe injuries, or other visuals that may be shocking or upsetting to some viewers.`,
),
description: _(msg`Explicit or potentially disturbing media.`),
},
}),
[_],
+19 -43
View File
@@ -283,8 +283,6 @@ export function ModerationScreenInner({
</Link>
</View>
{ageNotSet || !isUnderage ? (
<>
<Text
style={[
a.pt_2xl,
@@ -297,39 +295,24 @@ export function ModerationScreenInner({
</Text>
<View style={[a.gap_md]}>
{ageNotSet ? (
<>
<View
style={[
a.w_full,
a.rounded_md,
a.overflow_hidden,
t.atoms.bg_contrast_25,
a.py_md,
a.px_lg,
a.flex_row,
a.align_center,
a.justify_between,
]}>
<Text style={[a.text_md, t.atoms.text_contrast_high]}>
<Trans>Confirm your age:</Trans>
</Text>
{ageNotSet && (
<Button
label={_(msg`Confirm your birthdate`)}
size="small"
variant="solid"
color="secondary"
color="tertiary"
onPress={() => {
openModal({name: 'birth-date-settings'})
}}>
}}
style={[a.justify_between, a.rounded_md, a.px_lg, a.py_lg]}>
<ButtonText>
<Trans>Confirm your age:</Trans>
</ButtonText>
<ButtonText>
<Trans>Set birthdate</Trans>
</ButtonText>
</Button>
</View>
</>
) : (
<>
)}
<View
style={[
a.w_full,
@@ -337,6 +320,8 @@ export function ModerationScreenInner({
a.overflow_hidden,
t.atoms.bg_contrast_25,
]}>
{!ageNotSet && !isUnderage && (
<>
<View
style={[
a.py_lg,
@@ -345,14 +330,11 @@ export function ModerationScreenInner({
a.align_center,
a.justify_between,
]}>
<Text
style={[a.font_semibold, t.atoms.text_contrast_high]}>
<Text style={[a.font_semibold, t.atoms.text_contrast_high]}>
<Trans>Enable adult content</Trans>
</Text>
<Toggle.Item
label={_(
msg`Toggle to enable or disable adult content`,
)}
label={_(msg`Toggle to enable or disable adult content`)}
name="adultContent"
value={adultContentEnabled}
onChange={onToggleAdultContentEnabled}>
@@ -368,12 +350,12 @@ export function ModerationScreenInner({
</View>
</Toggle.Item>
</View>
{adultContentEnabled && (
<>
<Divider />
<GlobalModerationLabelPref
labelValueDefinition={LABELS.porn}
/>
</>
)}
{!isUnderage && adultContentEnabled && (
<>
<GlobalModerationLabelPref labelValueDefinition={LABELS.porn} />
<Divider />
<GlobalModerationLabelPref
labelValueDefinition={LABELS.sexual}
@@ -382,18 +364,12 @@ export function ModerationScreenInner({
<GlobalModerationLabelPref
labelValueDefinition={LABELS['graphic-media']}
/>
</>
)}
<Divider />
<GlobalModerationLabelPref
labelValueDefinition={LABELS.nudity}
/>
</View>
</>
)}
<GlobalModerationLabelPref labelValueDefinition={LABELS.nudity} />
</View>
</View>
</>
) : null}
<Text
style={[