fork
Configure Feed
Select the types of activity you want to include in your feed.
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.
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 feedgen: ReportOption[]
18 other: ReportOption[]
19 convoMessage: ReportOption[]
20}
21
22export function useReportOptions(): ReportOptions {
23 const {_} = useLingui()
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.REASONSPAM,
67 title: _(msg`Spam`),
68 description: _(msg`Excessive mentions or replies`),
69 },
70 {
71 reason: ComAtprotoModerationDefs.REASONSEXUAL,
72 title: _(msg`Unwanted Sexual Content`),
73 description: _(msg`Nudity or adult content not labeled as such`),
74 },
75 ...common,
76 ],
77 convoMessage: [
78 {
79 reason: ComAtprotoModerationDefs.REASONSPAM,
80 title: _(msg`Spam`),
81 description: _(msg`Excessive or unwanted messages`),
82 },
83 {
84 reason: ComAtprotoModerationDefs.REASONSEXUAL,
85 title: _(msg`Unwanted Sexual Content`),
86 description: _(msg`Inappropriate messages or explicit links`),
87 },
88 ...common,
89 ],
90 list: [
91 {
92 reason: ComAtprotoModerationDefs.REASONVIOLATION,
93 title: _(msg`Name or Description Violates Community Standards`),
94 description: _(msg`Terms used violate community standards`),
95 },
96 ...common,
97 ],
98 starterpack: [
99 {
100 reason: ComAtprotoModerationDefs.REASONVIOLATION,
101 title: _(msg`Name or Description Violates Community Standards`),
102 description: _(msg`Terms used violate community standards`),
103 },
104 ...common,
105 ],
106 feedgen: [
107 {
108 reason: ComAtprotoModerationDefs.REASONVIOLATION,
109 title: _(msg`Name or Description Violates Community Standards`),
110 description: _(msg`Terms used violate community standards`),
111 },
112 ...common,
113 ],
114 other: common,
115 }
116 }, [_])
117}