Skip to content

Commit a8630e9

Browse files
authored
Redesign report form and prevent duplicate reports (#3211)
* Redesign report form and prevent duplicate reports * Fix lint * Add malware evidence notice to report form * Fix lint
1 parent 9574e8e commit a8630e9

File tree

9 files changed

+636
-146
lines changed

9 files changed

+636
-146
lines changed

apps/app-frontend/src/locales/en-US/index.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"app.settings.tabs.resource-management": {
2121
"message": "Resource management"
2222
},
23+
"instance.filter.disabled": {
24+
"message": "Disabled projects"
25+
},
2326
"instance.filter.updates-available": {
2427
"message": "Updates available"
2528
},

apps/frontend/src/locales/en-US/index.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,81 @@
485485
"project.versions.title": {
486486
"message": "Versions"
487487
},
488+
"report.already-reported": {
489+
"message": "You've already reported {title}"
490+
},
491+
"report.already-reported-description": {
492+
"message": "You have an open report for this {item} already. You can add more details to your report if you have more information to add."
493+
},
494+
"report.back-to-item": {
495+
"message": "Back to {item}"
496+
},
497+
"report.body.description": {
498+
"message": "Include links and images if possible and relevant. Empty or insufficient reports will be closed and ignored."
499+
},
500+
"report.body.title": {
501+
"message": "Please provide additional context about your report"
502+
},
503+
"report.checking": {
504+
"message": "Checking {item}..."
505+
},
506+
"report.could-not-find": {
507+
"message": "Could not find {item}"
508+
},
509+
"report.for.violation": {
510+
"message": "Violation of Modrinth <rules-link>Rules</rules-link> or <terms-link>Terms of Use</terms-link>"
511+
},
512+
"report.for.violation.description": {
513+
"message": "Examples include malicious, spam, offensive, deceptive, misleading, and illegal content."
514+
},
515+
"report.form-not-for": {
516+
"message": "This form is not for:"
517+
},
518+
"report.go-to-report": {
519+
"message": "Go to report"
520+
},
521+
"report.not-for.bug-reports": {
522+
"message": "Bug reports"
523+
},
524+
"report.not-for.dmca": {
525+
"message": "DMCA takedowns"
526+
},
527+
"report.not-for.dmca.description": {
528+
"message": "See our <policy-link>Copyright Policy</policy-link>."
529+
},
530+
"report.note.copyright.1": {
531+
"message": "Please note that you are *not* submitting a DMCA takedown request, but rather a report of reuploaded content."
532+
},
533+
"report.note.copyright.2": {
534+
"message": "If you meant to file a DMCA takedown request (which is a legal action) instead, please see our <copyright-policy-link>Copyright Policy</copyright-policy-link>."
535+
},
536+
"report.note.malicious.1": {
537+
"message": "Reports for malicious or deceptive content must include substantial evidence of the behavior, such as code samples."
538+
},
539+
"report.note.malicious.2": {
540+
"message": "Summaries from Microsoft Defender, VirusTotal, or AI malware detection are not sufficient forms of evidence and will not be accepted."
541+
},
542+
"report.please-report": {
543+
"message": "Please report:"
544+
},
545+
"report.question.content-id": {
546+
"message": "What is the ID of the {item}?"
547+
},
548+
"report.question.content-type": {
549+
"message": "What type of content are you reporting?"
550+
},
551+
"report.question.report-reason": {
552+
"message": "Which of Modrinth's rules is this {item} violating?"
553+
},
554+
"report.report-content": {
555+
"message": "Report content to moderators"
556+
},
557+
"report.report-item": {
558+
"message": "Report {title} to moderators"
559+
},
560+
"report.submit": {
561+
"message": "Submit report"
562+
},
488563
"revenue.transfers.total": {
489564
"message": "You have withdrawn {amount} in total."
490565
},

apps/frontend/src/pages/[type]/[id].vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@
631631
auth.user ? reportProject(project.id) : navigateTo('/auth/sign-in'),
632632
color: 'red',
633633
hoverOnly: true,
634-
shown: !currentMember,
634+
shown: !isMember,
635635
},
636636
{ id: 'copy-id', action: () => copyId() },
637637
]"
@@ -1204,6 +1204,10 @@ const members = computed(() => {
12041204
return owner ? [owner, ...rest] : rest;
12051205
});
12061206
1207+
const isMember = computed(
1208+
() => auth.value.user && allMembers.value.some((x) => x.user.id === auth.value.user.id),
1209+
);
1210+
12071211
const currentMember = computed(() => {
12081212
let val = auth.value.user ? allMembers.value.find((x) => x.user.id === auth.value.user.id) : null;
12091213

0 commit comments

Comments
 (0)