diff --git a/svelte/src/file_viewer/FileViewer.svelte b/svelte/src/file_viewer/FileViewer.svelte index f5b08da..3c11617 100644 --- a/svelte/src/file_viewer/FileViewer.svelte +++ b/svelte/src/file_viewer/FileViewer.svelte @@ -320,6 +320,7 @@ const keyboard_event = evt => { if ( document.activeElement.type && ( document.activeElement.type === "text" || + document.activeElement.type === "email" || document.activeElement.type === "textarea" ) ) { diff --git a/svelte/src/file_viewer/ReportWindow.svelte b/svelte/src/file_viewer/ReportWindow.svelte index 8844ff0..fe6014d 100644 --- a/svelte/src/file_viewer/ReportWindow.svelte +++ b/svelte/src/file_viewer/ReportWindow.svelte @@ -13,7 +13,6 @@ export let list = { let abuse_type = "" let single_or_all = "single" -let description = "" let loading = false let results = [] @@ -50,7 +49,7 @@ let submit = async e => { const form = new FormData() form.append("type", abuse_type) - form.append("description", description) + form.append("description", report_description()) results = [] @@ -82,6 +81,30 @@ let submit = async e => { loading = false } + +let description = "" +let copyright_rightsholder = "" +let copyright_email = "" +let copyright_sources = "" +let malware_proof = "" +let child_abuse_password = "" + +const report_description = () => { + if (abuse_type === "copyright") { + return "Rightholder name: " + copyright_rightsholder + "\n" + + "Contact e-mail: " + copyright_email + "\n" + + "Sources:\n" + copyright_sources + "\n\n" + + "Description:\n" + description; + } else if (abuse_type === "malware") { + return "Proof: " + malware_proof + "\n" + + "Description:\n" + description; + } else if (abuse_type === "child_abuse") { + return "Password: " + child_abuse_password + "\n" + + "Description:\n" + description; + } else { + return description + } +}
@@ -90,12 +113,17 @@ let submit = async e => { content policy you can report it for moderation with this form.

-
+

Abuse type

Which type of abuse is shown in this file? Pick the most appropriate one.

+ - {#if list.id !== "" && file.id !== ""}

Report multiple files?

@@ -146,12 +169,40 @@ let submit = async e => { {/if}

Description

-

- Please provide some context for your report, like contact - information in case of copyright abuse, or a password if the file is - encrypted. ({description.length}/500) -

- + + {#if abuse_type === "copyright"} + +
Name rightsholder (can be a registered company name)
+ + +
Contact e-mail
+ + +
Source URLs (links to the places where this content was allegedly stolen from)
+ + + {:else if abuse_type === "malware"} + +
+ Proof that this file is malware. This can be a link to + VirusTotal + scan results, or some other security vendor which has + information about this file +
+ + + {:else if abuse_type === "child_abuse"} + +
If this file is an encrypted archive, please provide the password so we can verify the contents
+ + + {/if} + +
+ Please provide some context for your report. Why do you think this + file violates the content policy? ({description.length}/500) +
+

Send

{#if loading} @@ -170,10 +221,10 @@ let submit = async e => { take more than 24 hours. During busy periods it can take longer.

-
-
@@ -198,4 +249,16 @@ label { width: 100px; z-index: 1000; } +.report_form { + width: 100%; +} +.report_form > input[type="text"], +.report_form > input[type="email"], +.report_form > textarea { + width: 100%; + margin: 0 0 0.5em 0; +} +.report_form > textarea { + height: 5em; +}