mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
fork

Configure Feed

Select the types of activity you want to include in your feed.

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