Add copyright link
This commit is contained in:
@@ -1,98 +1 @@
|
|||||||
import {ComAtprotoModerationDefs} from '@atproto/api'
|
export const DMCA_LINK = 'https://bsky.social/about/support/copyright'
|
||||||
|
|
||||||
import {ParsedReportSubject} from './types'
|
|
||||||
|
|
||||||
export const ALL_REPORT_REASON_TYPES = [
|
|
||||||
'com.atproto.moderation.defs#reasonSpam',
|
|
||||||
'com.atproto.moderation.defs#reasonViolation',
|
|
||||||
'com.atproto.moderation.defs#reasonMisleading',
|
|
||||||
'com.atproto.moderation.defs#reasonSexual',
|
|
||||||
'com.atproto.moderation.defs#reasonRude',
|
|
||||||
'com.atproto.moderation.defs#reasonHarassment',
|
|
||||||
'com.atproto.moderation.defs#reasonAnimalAbuse',
|
|
||||||
'com.atproto.moderation.defs#reasonGraphic',
|
|
||||||
'com.atproto.moderation.defs#reasonScam',
|
|
||||||
'com.atproto.moderation.defs#reasonProhibitedCommerce',
|
|
||||||
'com.atproto.moderation.defs#reasonInauthentic',
|
|
||||||
'com.atproto.moderation.defs#reasonImpersonation',
|
|
||||||
'com.atproto.moderation.defs#reasonBanEvasion',
|
|
||||||
'com.atproto.moderation.defs#reasonChildSafety',
|
|
||||||
'com.atproto.moderation.defs#reasonSelfHarm',
|
|
||||||
'com.atproto.moderation.defs#reasonThreat',
|
|
||||||
'com.atproto.moderation.defs#reasonIntolerance',
|
|
||||||
'com.atproto.moderation.defs#reasonPrivateInfo',
|
|
||||||
'com.atproto.moderation.defs#reasonSexualAbuse',
|
|
||||||
'com.atproto.moderation.defs#reasonSiteSecurity',
|
|
||||||
'com.atproto.moderation.defs#reasonTerrorViolentExtremist',
|
|
||||||
'com.atproto.moderation.defs#reasonSpoiler',
|
|
||||||
'com.atproto.moderation.defs#reasonGrowthHack',
|
|
||||||
'com.atproto.moderation.defs#reasonOther',
|
|
||||||
]
|
|
||||||
|
|
||||||
const REASONHARRASSMENT = 'com.atproto.moderation.defs#reasonHarassment'
|
|
||||||
const REASONINAUTHENTIC = 'com.atproto.moderation.defs#reasonInauthentic'
|
|
||||||
const REASONIMPERSONATION = 'com.atproto.moderation.defs#reasonImpersonation'
|
|
||||||
const REASONBANEVASION = 'com.atproto.moderation.defs#reasonBanEvasion'
|
|
||||||
const REASONTERRORVIOLENTEXTREMIST =
|
|
||||||
'com.atproto.moderation.defs#reasonTerrorViolentExtremist'
|
|
||||||
const REASONANIMALABUSE = 'com.atproto.moderation.defs#reasonAnimalAbuse'
|
|
||||||
const REASONGRAPHIC = 'com.atproto.moderation.defs#reasonGraphic'
|
|
||||||
const REASONSCAM = 'com.atproto.moderation.defs#reasonScam'
|
|
||||||
const REASONPROHIBITEDCOMMERCE =
|
|
||||||
'com.atproto.moderation.defs#reasonProhibitedCommerce'
|
|
||||||
const REASONCHILDSAFETY = 'com.atproto.moderation.defs#reasonChildSafety'
|
|
||||||
const REASONSELFHARM = 'com.atproto.moderation.defs#reasonSelfHarm'
|
|
||||||
const REASONTHREAT = 'com.atproto.moderation.defs#reasonThreat'
|
|
||||||
const REASONINTOLERANCE = 'com.atproto.moderation.defs#reasonIntolerance'
|
|
||||||
const REASONPRIVATEINFO = 'com.atproto.moderation.defs#reasonPrivateInfo'
|
|
||||||
const REASONSEXUALABUSE = 'com.atproto.moderation.defs#reasonSexualAbuse'
|
|
||||||
const REASONSITESECURITY = 'com.atproto.moderation.defs#reasonSiteSecurity'
|
|
||||||
|
|
||||||
const RECORD_REPORT_OPTIONS = [
|
|
||||||
ComAtprotoModerationDefs.REASONSPAM,
|
|
||||||
REASONHARRASSMENT,
|
|
||||||
ComAtprotoModerationDefs.REASONMISLEADING,
|
|
||||||
ComAtprotoModerationDefs.REASONSEXUAL,
|
|
||||||
REASONANIMALABUSE,
|
|
||||||
REASONGRAPHIC,
|
|
||||||
REASONSCAM,
|
|
||||||
REASONPROHIBITEDCOMMERCE,
|
|
||||||
REASONCHILDSAFETY,
|
|
||||||
REASONSELFHARM,
|
|
||||||
REASONTHREAT,
|
|
||||||
REASONINTOLERANCE,
|
|
||||||
REASONPRIVATEINFO,
|
|
||||||
REASONSEXUALABUSE,
|
|
||||||
REASONSITESECURITY,
|
|
||||||
REASONTERRORVIOLENTEXTREMIST,
|
|
||||||
|
|
||||||
ComAtprotoModerationDefs.REASONOTHER,
|
|
||||||
]
|
|
||||||
|
|
||||||
export const REPORT_OPTIONS: Record<ParsedReportSubject['type'], string[]> = {
|
|
||||||
account: [
|
|
||||||
REASONHARRASSMENT,
|
|
||||||
REASONINAUTHENTIC,
|
|
||||||
REASONIMPERSONATION,
|
|
||||||
REASONBANEVASION,
|
|
||||||
REASONTERRORVIOLENTEXTREMIST,
|
|
||||||
ComAtprotoModerationDefs.REASONSPAM,
|
|
||||||
ComAtprotoModerationDefs.REASONMISLEADING,
|
|
||||||
ComAtprotoModerationDefs.REASONOTHER,
|
|
||||||
],
|
|
||||||
post: RECORD_REPORT_OPTIONS,
|
|
||||||
list: RECORD_REPORT_OPTIONS,
|
|
||||||
feed: RECORD_REPORT_OPTIONS,
|
|
||||||
starterPack: RECORD_REPORT_OPTIONS,
|
|
||||||
chatMessage: [
|
|
||||||
ComAtprotoModerationDefs.REASONSPAM,
|
|
||||||
REASONHARRASSMENT,
|
|
||||||
ComAtprotoModerationDefs.REASONSEXUAL,
|
|
||||||
REASONSCAM,
|
|
||||||
REASONCHILDSAFETY,
|
|
||||||
REASONSELFHARM,
|
|
||||||
REASONTHREAT,
|
|
||||||
REASONPRIVATEINFO,
|
|
||||||
ComAtprotoModerationDefs.REASONOTHER,
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -23,11 +23,13 @@ import {
|
|||||||
CheckThick_Stroke2_Corner0_Rounded as Check,
|
CheckThick_Stroke2_Corner0_Rounded as Check,
|
||||||
} from '#/components/icons/Check'
|
} from '#/components/icons/Check'
|
||||||
import {PaperPlane_Stroke2_Corner0_Rounded as PaperPlane} from '#/components/icons/PaperPlane'
|
import {PaperPlane_Stroke2_Corner0_Rounded as PaperPlane} from '#/components/icons/PaperPlane'
|
||||||
|
import {SquareArrowTopRight_Stroke2_Corner0_Rounded as SquareArrowTopRight} from '#/components/icons/SquareArrowTopRight'
|
||||||
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times'
|
||||||
import {createStaticClick, InlineLinkText} from '#/components/Link'
|
import {createStaticClick, InlineLinkText, Link} from '#/components/Link'
|
||||||
import {Loader} from '#/components/Loader'
|
import {Loader} from '#/components/Loader'
|
||||||
import {Text} from '#/components/Typography'
|
import {Text} from '#/components/Typography'
|
||||||
import {useSubmitReportMutation} from './action'
|
import {useSubmitReportMutation} from './action'
|
||||||
|
import {DMCA_LINK} from './const'
|
||||||
import {useCopyForSubject} from './copy'
|
import {useCopyForSubject} from './copy'
|
||||||
import {initialState, reducer} from './state'
|
import {initialState, reducer} from './state'
|
||||||
import {ReportDialogProps, ReportSubject} from './types'
|
import {ReportDialogProps, ReportSubject} from './types'
|
||||||
@@ -76,6 +78,7 @@ function Invalid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Inner(props: ReportDialogProps) {
|
function Inner(props: ReportDialogProps) {
|
||||||
|
const t = useTheme()
|
||||||
const {_} = useLingui()
|
const {_} = useLingui()
|
||||||
const ref = React.useRef<ScrollView>(null)
|
const ref = React.useRef<ScrollView>(null)
|
||||||
const {
|
const {
|
||||||
@@ -217,6 +220,38 @@ function Inner(props: ReportDialogProps) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
|
{['post', 'account'].includes(props.subject.type) && (
|
||||||
|
<Link
|
||||||
|
to={DMCA_LINK}
|
||||||
|
label={_(
|
||||||
|
msg`View details for reporting a copyright violation`,
|
||||||
|
)}>
|
||||||
|
{({hovered, pressed}) => (
|
||||||
|
<View
|
||||||
|
style={[
|
||||||
|
a.flex_row,
|
||||||
|
a.align_center,
|
||||||
|
a.w_full,
|
||||||
|
a.px_md,
|
||||||
|
a.py_sm,
|
||||||
|
a.rounded_sm,
|
||||||
|
a.border,
|
||||||
|
hovered || pressed
|
||||||
|
? [t.atoms.border_contrast_high]
|
||||||
|
: [t.atoms.border_contrast_low],
|
||||||
|
]}>
|
||||||
|
<Text style={[a.flex_1, a.italic, a.leading_snug]}>
|
||||||
|
<Trans>Need to report a copyright violation?</Trans>
|
||||||
|
</Text>
|
||||||
|
<SquareArrowTopRight
|
||||||
|
size="sm"
|
||||||
|
fill={t.atoms.text.color}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
Reference in New Issue
Block a user