mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
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 starterPack: ReportOption[] 17 feed: ReportOption[] 18 chatMessage: ReportOption[] 19} 20 21export function useReportOptions(): ReportOptions { 22 const {_} = useLingui() 23 24 return useMemo(() => { 25 const other = { 26 reason: ComAtprotoModerationDefs.REASONOTHER, 27 title: _(msg`Other`), 28 description: _(msg`An issue not included in these options`), 29 } 30 const common = [ 31 { 32 reason: ComAtprotoModerationDefs.REASONRUDE, 33 title: _(msg`Anti-Social Behavior`), 34 description: _(msg`Harassment, trolling, or intolerance`), 35 }, 36 { 37 reason: ComAtprotoModerationDefs.REASONVIOLATION, 38 title: _(msg`Illegal and Urgent`), 39 description: _(msg`Glaring violations of law or terms of service`), 40 }, 41 other, 42 ] 43 return { 44 account: [ 45 { 46 reason: ComAtprotoModerationDefs.REASONMISLEADING, 47 title: _(msg`Misleading Account`), 48 description: _( 49 msg`Impersonation or false claims about identity or affiliation`, 50 ), 51 }, 52 { 53 reason: ComAtprotoModerationDefs.REASONSPAM, 54 title: _(msg`Frequently Posts Unwanted Content`), 55 description: _(msg`Spam; excessive mentions or replies`), 56 }, 57 { 58 reason: ComAtprotoModerationDefs.REASONVIOLATION, 59 title: _(msg`Name or Description Violates Community Standards`), 60 description: _(msg`Terms used violate community standards`), 61 }, 62 other, 63 ], 64 post: [ 65 { 66 reason: ComAtprotoModerationDefs.REASONMISLEADING, 67 title: _(msg`Misleading Post`), 68 description: _(msg`Impersonation, misinformation, or false claims`), 69 }, 70 { 71 reason: ComAtprotoModerationDefs.REASONSPAM, 72 title: _(msg`Spam`), 73 description: _(msg`Excessive mentions or replies`), 74 }, 75 { 76 reason: ComAtprotoModerationDefs.REASONSEXUAL, 77 title: _(msg`Unwanted Sexual Content`), 78 description: _(msg`Nudity or adult content not labeled as such`), 79 }, 80 ...common, 81 ], 82 chatMessage: [ 83 { 84 reason: ComAtprotoModerationDefs.REASONSPAM, 85 title: _(msg`Spam`), 86 description: _(msg`Excessive or unwanted messages`), 87 }, 88 { 89 reason: ComAtprotoModerationDefs.REASONSEXUAL, 90 title: _(msg`Unwanted Sexual Content`), 91 description: _(msg`Inappropriate messages or explicit links`), 92 }, 93 ...common, 94 ], 95 list: [ 96 { 97 reason: ComAtprotoModerationDefs.REASONVIOLATION, 98 title: _(msg`Name or Description Violates Community Standards`), 99 description: _(msg`Terms used violate community standards`), 100 }, 101 ...common, 102 ], 103 starterPack: [ 104 { 105 reason: ComAtprotoModerationDefs.REASONVIOLATION, 106 title: _(msg`Name or Description Violates Community Standards`), 107 description: _(msg`Terms used violate community standards`), 108 }, 109 ...common, 110 ], 111 feed: [ 112 { 113 reason: ComAtprotoModerationDefs.REASONVIOLATION, 114 title: _(msg`Name or Description Violates Community Standards`), 115 description: _(msg`Terms used violate community standards`), 116 }, 117 ...common, 118 ], 119 } 120 }, [_]) 121}