Fixes to the adult content age-gating in moderaiton
This commit is contained in:
@@ -44,9 +44,7 @@ export function useGlobalLabelStrings(): GlobalLabelStrings {
|
|||||||
},
|
},
|
||||||
'graphic-media': {
|
'graphic-media': {
|
||||||
name: _(msg`Graphic Media`),
|
name: _(msg`Graphic Media`),
|
||||||
description: _(
|
description: _(msg`Explicit or potentially disturbing media.`),
|
||||||
msg`Explicit or potentially disturbing media, including graphic violence, severe injuries, or other visuals that may be shocking or upsetting to some viewers.`,
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
[_],
|
[_],
|
||||||
|
|||||||
@@ -283,117 +283,93 @@ export function ModerationScreenInner({
|
|||||||
</Link>
|
</Link>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{ageNotSet || !isUnderage ? (
|
<Text
|
||||||
<>
|
style={[
|
||||||
<Text
|
a.pt_2xl,
|
||||||
style={[
|
a.pb_md,
|
||||||
a.pt_2xl,
|
a.text_md,
|
||||||
a.pb_md,
|
a.font_bold,
|
||||||
a.text_md,
|
t.atoms.text_contrast_high,
|
||||||
a.font_bold,
|
]}>
|
||||||
t.atoms.text_contrast_high,
|
<Trans>Content filters</Trans>
|
||||||
]}>
|
</Text>
|
||||||
<Trans>Content filters</Trans>
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
<View style={[a.gap_md]}>
|
<View style={[a.gap_md]}>
|
||||||
{ageNotSet ? (
|
{ageNotSet && (
|
||||||
<>
|
<Button
|
||||||
<View
|
label={_(msg`Confirm your birthdate`)}
|
||||||
style={[
|
size="small"
|
||||||
a.w_full,
|
variant="solid"
|
||||||
a.rounded_md,
|
color="tertiary"
|
||||||
a.overflow_hidden,
|
onPress={() => {
|
||||||
t.atoms.bg_contrast_25,
|
openModal({name: 'birth-date-settings'})
|
||||||
a.py_md,
|
}}
|
||||||
a.px_lg,
|
style={[a.justify_between, a.rounded_md, a.px_lg, a.py_lg]}>
|
||||||
a.flex_row,
|
<ButtonText>
|
||||||
a.align_center,
|
<Trans>Confirm your age:</Trans>
|
||||||
a.justify_between,
|
</ButtonText>
|
||||||
]}>
|
<ButtonText>
|
||||||
<Text style={[a.text_md, t.atoms.text_contrast_high]}>
|
<Trans>Set birthdate</Trans>
|
||||||
<Trans>Confirm your age:</Trans>
|
</ButtonText>
|
||||||
</Text>
|
</Button>
|
||||||
<Button
|
)}
|
||||||
label={_(msg`Confirm your birthdate`)}
|
<View
|
||||||
size="small"
|
style={[
|
||||||
variant="solid"
|
a.w_full,
|
||||||
color="secondary"
|
a.rounded_md,
|
||||||
onPress={() => {
|
a.overflow_hidden,
|
||||||
openModal({name: 'birth-date-settings'})
|
t.atoms.bg_contrast_25,
|
||||||
}}>
|
]}>
|
||||||
<ButtonText>
|
{!ageNotSet && !isUnderage && (
|
||||||
<Trans>Set birthdate</Trans>
|
<>
|
||||||
</ButtonText>
|
<View
|
||||||
</Button>
|
style={[
|
||||||
</View>
|
a.py_lg,
|
||||||
</>
|
a.px_lg,
|
||||||
) : (
|
a.flex_row,
|
||||||
<>
|
a.align_center,
|
||||||
<View
|
a.justify_between,
|
||||||
style={[
|
]}>
|
||||||
a.w_full,
|
<Text style={[a.font_semibold, t.atoms.text_contrast_high]}>
|
||||||
a.rounded_md,
|
<Trans>Enable adult content</Trans>
|
||||||
a.overflow_hidden,
|
</Text>
|
||||||
t.atoms.bg_contrast_25,
|
<Toggle.Item
|
||||||
]}>
|
label={_(msg`Toggle to enable or disable adult content`)}
|
||||||
<View
|
name="adultContent"
|
||||||
style={[
|
value={adultContentEnabled}
|
||||||
a.py_lg,
|
onChange={onToggleAdultContentEnabled}>
|
||||||
a.px_lg,
|
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
|
||||||
a.flex_row,
|
<Text style={[t.atoms.text_contrast_medium]}>
|
||||||
a.align_center,
|
{adultContentEnabled ? (
|
||||||
a.justify_between,
|
<Trans>Enabled</Trans>
|
||||||
]}>
|
) : (
|
||||||
<Text
|
<Trans>Disabled</Trans>
|
||||||
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`,
|
|
||||||
)}
|
)}
|
||||||
name="adultContent"
|
</Text>
|
||||||
value={adultContentEnabled}
|
<Toggle.Switch />
|
||||||
onChange={onToggleAdultContentEnabled}>
|
|
||||||
<View style={[a.flex_row, a.align_center, a.gap_sm]}>
|
|
||||||
<Text style={[t.atoms.text_contrast_medium]}>
|
|
||||||
{adultContentEnabled ? (
|
|
||||||
<Trans>Enabled</Trans>
|
|
||||||
) : (
|
|
||||||
<Trans>Disabled</Trans>
|
|
||||||
)}
|
|
||||||
</Text>
|
|
||||||
<Toggle.Switch />
|
|
||||||
</View>
|
|
||||||
</Toggle.Item>
|
|
||||||
</View>
|
</View>
|
||||||
{adultContentEnabled && (
|
</Toggle.Item>
|
||||||
<>
|
</View>
|
||||||
<Divider />
|
<Divider />
|
||||||
<GlobalModerationLabelPref
|
</>
|
||||||
labelValueDefinition={LABELS.porn}
|
)}
|
||||||
/>
|
{!isUnderage && adultContentEnabled && (
|
||||||
<Divider />
|
<>
|
||||||
<GlobalModerationLabelPref
|
<GlobalModerationLabelPref labelValueDefinition={LABELS.porn} />
|
||||||
labelValueDefinition={LABELS.sexual}
|
<Divider />
|
||||||
/>
|
<GlobalModerationLabelPref
|
||||||
<Divider />
|
labelValueDefinition={LABELS.sexual}
|
||||||
<GlobalModerationLabelPref
|
/>
|
||||||
labelValueDefinition={LABELS['graphic-media']}
|
<Divider />
|
||||||
/>
|
<GlobalModerationLabelPref
|
||||||
</>
|
labelValueDefinition={LABELS['graphic-media']}
|
||||||
)}
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
<GlobalModerationLabelPref
|
</>
|
||||||
labelValueDefinition={LABELS.nudity}
|
)}
|
||||||
/>
|
<GlobalModerationLabelPref labelValueDefinition={LABELS.nudity} />
|
||||||
</View>
|
</View>
|
||||||
</>
|
</View>
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
</>
|
|
||||||
) : null}
|
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
|
|||||||
Reference in New Issue
Block a user