Update ReasonOptions.tsx
parent
7a0bf7266a
commit
b4480738e3
|
@ -1,63 +1,66 @@
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import React, {useMemo} from 'react'
|
import React, {useMemo} from 'react'
|
||||||
import {AtUri, ComAtprotoModerationDefs} from '@atproto/api'
|
import {AtUri, ComAtprotoModerationDefs} from '@atproto/api'
|
||||||
|
import {Trans} from '@lingui/macro'
|
||||||
|
|
||||||
import {Text} from '../../util/text/Text'
|
import {Text} from '../../util/text/Text'
|
||||||
import {UsePaletteValue, usePalette} from 'lib/hooks/usePalette'
|
import {UsePaletteValue, usePalette} from 'lib/hooks/usePalette'
|
||||||
import {RadioGroup, RadioGroupItem} from 'view/com/util/forms/RadioGroup'
|
import {RadioGroup, RadioGroupItem} from 'view/com/util/forms/RadioGroup'
|
||||||
import {CollectionId} from './types'
|
import {CollectionId} from './types'
|
||||||
|
|
||||||
type ReasonMap = Record<string, {title: string; description: string}>
|
type ReasonMap = Record<string, {title: JSX.Element; description: JSX.Element}>
|
||||||
const CommonReasons = {
|
const CommonReasons = {
|
||||||
[ComAtprotoModerationDefs.REASONRUDE]: {
|
[ComAtprotoModerationDefs.REASONRUDE]: {
|
||||||
title: 'Anti-Social Behavior',
|
title: <Trans>Anti-Social Behavior</Trans>,
|
||||||
description: 'Harassment, trolling, or intolerance',
|
description: <Trans>Harassment, trolling, or intolerance</Trans>,
|
||||||
},
|
},
|
||||||
[ComAtprotoModerationDefs.REASONVIOLATION]: {
|
[ComAtprotoModerationDefs.REASONVIOLATION]: {
|
||||||
title: 'Illegal and Urgent',
|
title: <Trans>Illegal and Urgent</Trans>,
|
||||||
description: 'Glaring violations of law or terms of service',
|
description: <Trans>Glaring violations of law or terms of service</Trans>,
|
||||||
},
|
},
|
||||||
[ComAtprotoModerationDefs.REASONOTHER]: {
|
[ComAtprotoModerationDefs.REASONOTHER]: {
|
||||||
title: 'Other',
|
title: <Trans>Other</Trans>,
|
||||||
description: 'An issue not included in these options',
|
description: <Trans>An issue not included in these options</Trans>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
const CollectionToReasonsMap: Record<string, ReasonMap> = {
|
const CollectionToReasonsMap: Record<string, ReasonMap> = {
|
||||||
[CollectionId.Post]: {
|
[CollectionId.Post]: {
|
||||||
[ComAtprotoModerationDefs.REASONSPAM]: {
|
[ComAtprotoModerationDefs.REASONSPAM]: {
|
||||||
title: 'Spam',
|
title: <Trans>Spam</Trans>,
|
||||||
description: 'Excessive mentions or replies',
|
description: <Trans>Excessive mentions or replies</Trans>,
|
||||||
},
|
},
|
||||||
[ComAtprotoModerationDefs.REASONSEXUAL]: {
|
[ComAtprotoModerationDefs.REASONSEXUAL]: {
|
||||||
title: 'Unwanted Sexual Content',
|
title: <Trans>Unwanted Sexual Content</Trans>,
|
||||||
description: 'Nudity or pornography not labeled as such',
|
description: <Trans>Nudity or pornography not labeled as such</Trans>,
|
||||||
},
|
},
|
||||||
__copyright__: {
|
__copyright__: {
|
||||||
title: 'Copyright Violation',
|
title: <Trans>Copyright Violation</Trans>,
|
||||||
description: 'Contains copyrighted material',
|
description: <Trans>Contains copyrighted material</Trans>,
|
||||||
},
|
},
|
||||||
...CommonReasons,
|
...CommonReasons,
|
||||||
},
|
},
|
||||||
[CollectionId.List]: {
|
[CollectionId.List]: {
|
||||||
...CommonReasons,
|
...CommonReasons,
|
||||||
[ComAtprotoModerationDefs.REASONVIOLATION]: {
|
[ComAtprotoModerationDefs.REASONVIOLATION]: {
|
||||||
title: 'Name or Description Violates Community Standards',
|
title: <Trans>Name or Description Violates Community Standards</Trans>,
|
||||||
description: 'Terms used violate community standards',
|
description: <Trans>Terms used violate community standards</Trans>,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
const AccountReportReasons = {
|
const AccountReportReasons = {
|
||||||
[ComAtprotoModerationDefs.REASONMISLEADING]: {
|
[ComAtprotoModerationDefs.REASONMISLEADING]: {
|
||||||
title: 'Misleading Account',
|
title: <Trans>Misleading Account</Trans>,
|
||||||
description: 'Impersonation or false claims about identity or affiliation',
|
description: (
|
||||||
|
<Trans>Impersonation or false claims about identity or affiliation</Trans>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
[ComAtprotoModerationDefs.REASONSPAM]: {
|
[ComAtprotoModerationDefs.REASONSPAM]: {
|
||||||
title: 'Frequently Posts Unwanted Content',
|
title: <Trans>Frequently Posts Unwanted Content</Trans>,
|
||||||
description: 'Spam; excessive mentions or replies',
|
description: <Trans>Spam; excessive mentions or replies</Trans>,
|
||||||
},
|
},
|
||||||
[ComAtprotoModerationDefs.REASONVIOLATION]: {
|
[ComAtprotoModerationDefs.REASONVIOLATION]: {
|
||||||
title: 'Name or Description Violates Community Standards',
|
title: <Trans>Name or Description Violates Community Standards</Trans>,
|
||||||
description: 'Terms used violate community standards',
|
description: <Trans>Terms used violate community standards</Trans>,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue