mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at session/base 94 lines 2.8 kB view raw
1import {useMemo} from 'react' 2import {ComAtprotoModerationDefs} from '@atproto/api' 3import {msg} from '@lingui/macro' 4import {useLingui} from '@lingui/react' 5 6export interface ReportOption { 7 reason: string 8 title: string 9 description: string 10} 11 12interface ReportOptions { 13 account: ReportOption[] 14 post: ReportOption[] 15 list: ReportOption[] 16 feedgen: ReportOption[] 17 other: ReportOption[] 18} 19 20export function useReportOptions(): ReportOptions { 21 const {_} = useLingui() 22 return useMemo(() => { 23 const other = { 24 reason: ComAtprotoModerationDefs.REASONOTHER, 25 title: _(msg`Other`), 26 description: _(msg`An issue not included in these options`), 27 } 28 const common = [ 29 { 30 reason: ComAtprotoModerationDefs.REASONRUDE, 31 title: _(msg`Anti-Social Behavior`), 32 description: _(msg`Harassment, trolling, or intolerance`), 33 }, 34 { 35 reason: ComAtprotoModerationDefs.REASONVIOLATION, 36 title: _(msg`Illegal and Urgent`), 37 description: _(msg`Glaring violations of law or terms of service`), 38 }, 39 other, 40 ] 41 return { 42 account: [ 43 { 44 reason: ComAtprotoModerationDefs.REASONMISLEADING, 45 title: _(msg`Misleading Account`), 46 description: _( 47 msg`Impersonation or false claims about identity or affiliation`, 48 ), 49 }, 50 { 51 reason: ComAtprotoModerationDefs.REASONSPAM, 52 title: _(msg`Frequently Posts Unwanted Content`), 53 description: _(msg`Spam; excessive mentions or replies`), 54 }, 55 { 56 reason: ComAtprotoModerationDefs.REASONVIOLATION, 57 title: _(msg`Name or Description Violates Community Standards`), 58 description: _(msg`Terms used violate community standards`), 59 }, 60 other, 61 ], 62 post: [ 63 { 64 reason: ComAtprotoModerationDefs.REASONSPAM, 65 title: _(msg`Spam`), 66 description: _(msg`Excessive mentions or replies`), 67 }, 68 { 69 reason: ComAtprotoModerationDefs.REASONSEXUAL, 70 title: _(msg`Unwanted Sexual Content`), 71 description: _(msg`Nudity or adult content not labeled as such`), 72 }, 73 ...common, 74 ], 75 list: [ 76 { 77 reason: ComAtprotoModerationDefs.REASONVIOLATION, 78 title: _(msg`Name or Description Violates Community Standards`), 79 description: _(msg`Terms used violate community standards`), 80 }, 81 ...common, 82 ], 83 feedgen: [ 84 { 85 reason: ComAtprotoModerationDefs.REASONVIOLATION, 86 title: _(msg`Name or Description Violates Community Standards`), 87 description: _(msg`Terms used violate community standards`), 88 }, 89 ...common, 90 ], 91 other: common, 92 } 93 }, [_]) 94}