Get report flow working again with temporarily fixed report options
This commit is contained in:
@@ -25,21 +25,6 @@ export function isJustAMute(modui: ModerationUI): boolean {
|
||||
return modui.filters.length === 1 && modui.filters[0].type === 'muted'
|
||||
}
|
||||
|
||||
export function useConfigurableContentLabelGroups() {
|
||||
// TODO removeme
|
||||
return []
|
||||
}
|
||||
|
||||
export function useConfigurableProfileLabelGroups() {
|
||||
// TODO removeme
|
||||
return []
|
||||
}
|
||||
|
||||
export function useConfigurableAccountLabelGroups() {
|
||||
// TODO removeme
|
||||
return []
|
||||
}
|
||||
|
||||
export function getModerationServiceTitle({
|
||||
displayName,
|
||||
handle,
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
import {LABEL_GROUPS} from '@atproto/api'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useMemo} from 'react'
|
||||
|
||||
export type LabelGroupStrings = Record<
|
||||
keyof typeof LABEL_GROUPS | 'other',
|
||||
{name: string; description: string}
|
||||
>
|
||||
|
||||
export function useLabelGroupStrings(): LabelGroupStrings {
|
||||
const {_} = useLingui()
|
||||
return useMemo(
|
||||
() => ({
|
||||
system: {
|
||||
name: _(msg`System`),
|
||||
description: _(msg`Moderator overrides for special cases.`),
|
||||
},
|
||||
legal: {
|
||||
name: _(msg`Legal`),
|
||||
description: _(msg`Content removed for legal reasons.`),
|
||||
},
|
||||
'intellectual-property': {
|
||||
name: _(msg`Intellectual Property`),
|
||||
description: _(msg`Plagiarism, copying without attribution.`),
|
||||
},
|
||||
porn: {
|
||||
name: _(msg`Explicit Sexual Images`),
|
||||
description: _(msg`i.e. pornography.`),
|
||||
},
|
||||
suggestive: {
|
||||
name: _(msg`Sexually Suggestive`),
|
||||
description: _(msg`Does not include nudity.`),
|
||||
},
|
||||
nudity: {
|
||||
name: _(msg`Other Nudity`),
|
||||
description: _(msg`Including non-sexual and artistic.`),
|
||||
},
|
||||
violence: {
|
||||
name: _(msg`Violent / Bloody`),
|
||||
description: _(msg`Gore, self-harm, torture.`),
|
||||
},
|
||||
'drugs-alcohol': {
|
||||
name: _(msg`Substance Abuse`),
|
||||
description: _(msg`Use of drugs or alcohol.`),
|
||||
},
|
||||
'self-harm': {
|
||||
name: _(msg`Self Harm`),
|
||||
description: _(msg`Suicide, self-harm, eating disorders.`),
|
||||
},
|
||||
intolerance: {
|
||||
name: _(msg`Intolerance`),
|
||||
description: _(
|
||||
msg`Content or behavior which is hateful or intolerant toward a group of people.`,
|
||||
),
|
||||
},
|
||||
'bad-behavior': {
|
||||
name: _(msg`Bad Behavior`),
|
||||
description: _(
|
||||
msg`Harassment, bullying, and threats toward other users.`,
|
||||
),
|
||||
},
|
||||
rude: {
|
||||
name: _(msg`Rude`),
|
||||
description: _(msg`Behavior which is rude toward other users.`),
|
||||
},
|
||||
upsetting: {
|
||||
name: _(msg`Upsetting`),
|
||||
description: _(
|
||||
msg`Shocking, disgusting, or generally upsetting content.`,
|
||||
),
|
||||
},
|
||||
troubling: {
|
||||
name: _(msg`Troubling`),
|
||||
description: _(
|
||||
msg`Bad news, troubling information, or dispiriting content.`,
|
||||
),
|
||||
},
|
||||
'hate-group-mention': {
|
||||
name: _(msg`Hate Group Coverage`),
|
||||
description: _(
|
||||
msg`Images of terror groups, articles covering events, etc.`,
|
||||
),
|
||||
},
|
||||
discourse: {
|
||||
name: _(msg`Discourse / Drama`),
|
||||
description: _(
|
||||
msg`On-going discussions or debates that may be frustrating.`,
|
||||
),
|
||||
},
|
||||
curation: {
|
||||
name: _(msg`Curation`),
|
||||
description: _(
|
||||
msg`Judgment of the moderators to remove content not worth showing.`,
|
||||
),
|
||||
},
|
||||
spam: {
|
||||
name: _(msg`Spam`),
|
||||
description: _(msg`Content which doesn't add to the conversation.`),
|
||||
},
|
||||
misrepresentation: {
|
||||
name: _(msg`Misrepresentation`),
|
||||
description: _(msg`Impersonations, scams.`),
|
||||
},
|
||||
security: {
|
||||
name: _(msg`Security`),
|
||||
description: _(msg`Potential security attacks.`),
|
||||
},
|
||||
misinfo: {
|
||||
name: _(msg`Misinformation`),
|
||||
description: _(msg`Content which misleads or defrauds users.`),
|
||||
},
|
||||
context: {
|
||||
name: _(msg`Context`),
|
||||
description: _(
|
||||
msg`Helpful annotations to explain intent, such as satire or parody.`,
|
||||
),
|
||||
},
|
||||
bot: {
|
||||
name: _(msg`Bots`),
|
||||
description: _(msg`Automated accounts which follow the rules.`),
|
||||
},
|
||||
other: {
|
||||
name: _(msg`Other`),
|
||||
description: _(msg`Other content not covered by the other categories.`),
|
||||
},
|
||||
}),
|
||||
[_],
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useMemo} from 'react'
|
||||
import {ComAtprotoModerationDefs} from '@atproto/api'
|
||||
|
||||
export interface ReportOption {
|
||||
reason: string
|
||||
title: string
|
||||
description: string
|
||||
}
|
||||
|
||||
interface ReportOptions {
|
||||
account: ReportOption[]
|
||||
post: ReportOption[]
|
||||
list: ReportOption[]
|
||||
other: ReportOption[]
|
||||
}
|
||||
|
||||
export function useReportOptions(): ReportOptions {
|
||||
const {_} = useLingui()
|
||||
return useMemo(() => {
|
||||
const other = {
|
||||
reason: ComAtprotoModerationDefs.REASONOTHER,
|
||||
title: _(msg`Other`),
|
||||
description: _(msg`An issue not included in these options`),
|
||||
}
|
||||
const common = [
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONRUDE,
|
||||
title: _(msg`Anti-Social Behavior`),
|
||||
description: _(msg`Harassment, trolling, or intolerance`),
|
||||
},
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONVIOLATION,
|
||||
title: _(msg`Illegal and Urgent`),
|
||||
description: _(msg`Glaring violations of law or terms of service`),
|
||||
},
|
||||
other,
|
||||
]
|
||||
return {
|
||||
account: [
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONMISLEADING,
|
||||
title: _(msg`Misleading Account`),
|
||||
description: _(
|
||||
msg`Impersonation or false claims about identity or affiliation`,
|
||||
),
|
||||
},
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONSPAM,
|
||||
title: _(msg`Frequently Posts Unwanted Content`),
|
||||
description: _(msg`Spam; excessive mentions or replies`),
|
||||
},
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONVIOLATION,
|
||||
title: _(msg`Name or Description Violates Community Standards`),
|
||||
description: _(msg`Terms used violate community standards`),
|
||||
},
|
||||
other,
|
||||
],
|
||||
post: [
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONSPAM,
|
||||
title: _(msg`Spam`),
|
||||
description: _(msg`Excessive mentions or replies`),
|
||||
},
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONSEXUAL,
|
||||
title: _(msg`Unwanted Sexual Content`),
|
||||
description: _(msg`Nudity or pornography not labeled as such`),
|
||||
},
|
||||
...common,
|
||||
],
|
||||
list: [
|
||||
{
|
||||
reason: ComAtprotoModerationDefs.REASONVIOLATION,
|
||||
title: _(msg`Name or Description Violates Community Standards`),
|
||||
description: _(msg`Terms used violate community standards`),
|
||||
},
|
||||
...common,
|
||||
],
|
||||
other: common,
|
||||
}
|
||||
}, [_])
|
||||
}
|
||||
Reference in New Issue
Block a user