Add abuse categories for porn and zoophilia

This commit is contained in:
2024-04-11 13:55:28 +02:00
parent 781f5b873d
commit 605dc29e69
3 changed files with 78 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
<script>
import { formatDate } from "../util/Formatting.svelte";
import { formatDate, formatNumber } from "../util/Formatting.svelte";
import Expandable from "../util/Expandable.svelte";
import { createEventDispatcher } from "svelte";
let dispatch = createEventDispatcher()
@@ -30,12 +30,12 @@ let set_status = async (action, report_type) => {
<div class="stats">Status<br/>{report.status}</div>
{/if}
<div class="stats">R<br/>{report.reports.length}</div>
<div class="stats">V<br/>{report.file.views}</div>
<div class="stats">DL<br/>{Math.round(report.file.bandwidth_used / report.file.size)}</div>
<div class="stats">V<br/>{formatNumber(report.file.views, 3)}</div>
<div class="stats">DL<br/>{formatNumber(report.file.bandwidth_used / report.file.size, 3)}</div>
</div>
<div class="details">
<div class="toolbar">
<div style="flex: 1 1 auto">
<div class="action_list">
<a class="button" target="_blank" href={"/u/"+report.file.id} rel="noreferrer">
<i class="icon">open_in_new</i> Open file
</a>
@@ -53,14 +53,16 @@ let set_status = async (action, report_type) => {
</button>
{/if}
</div>
<div style="flex: 0 1 auto">
<div class="type_list">
<button on:click={() => {set_status("grant", "copyright")}}>copyright</button>
<button on:click={() => {set_status("grant", "porn")}}>porn</button>
<button on:click={() => {set_status("grant", "terrorism")}}>terrorism</button>
<button on:click={() => {set_status("grant", "gore")}}>gore</button>
<button on:click={() => {set_status("grant", "child_abuse")}}>child_abuse</button>
<button on:click={() => {set_status("grant", "zoophilia")}}>zoophilia</button>
<button on:click={() => {set_status("grant", "malware")}}>malware</button>
<button on:click={() => {set_status("grant", "doxing")}}>doxing</button>
<button on:click={() => {set_status("grant", "revenge_porn")}}>revenge_porn</button>
<button on:click={() => {set_status("grant", "copyright")}}>copyright</button>
</div>
</div>
<div style="text-align: center;">
@@ -149,4 +151,26 @@ let set_status = async (action, report_type) => {
width:48px;
height:48px;
}
.action_list {
flex: 0 0 auto;
display: grid;
grid-template-columns: 1fr 1fr;
}
@media(max-width: 600px) {
.action_list {
grid-template-columns: 1fr;
}
}
.type_list {
flex: 1 1 auto;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
align-content: center;
}
.type_list > * {
flex: 0 0 auto;
}
</style>

View File

@@ -17,7 +17,9 @@ let block_form = {
radio_values: [
"unknown",
"copyright",
"porn",
"child_abuse",
"zoophilia",
"terrorism",
"gore",
"malware",

View File

@@ -11,6 +11,45 @@ export let list = {
files: [],
}
const abuse_categories = [
{
type: "copyright", name: "Copyright",
desc: `Protected content which is shared without constent from the
rightsholder`,
}, {
type: "porn", name: "Porn",
desc: `Sexually explicit videos or images`,
}, {
type: "terrorism", name: "Terrorism",
desc: `Videos, images or audio fragments showing or promoting the use
of intentional violence to achieve political aims`,
}, {
type: "gore", name: "Gore",
desc: `Graphic and shocking videos or images depicting severe harm to
humans (or animals)`,
}, {
type: "child_abuse", name: "Child abuse",
desc: `Videos or images depicting inappropriate touching or nudity of
children under 18 years old`,
}, {
type: "zoophilia", name: "Zoophilia",
desc: `Videos or images depicting of sexual acts being performed on
animals`,
}, {
type: "doxing", name: "Doxing",
desc: `Personally identifiable information being shared without the
consent of the owner. This includes things like passport scans,
e-mail addresses, telephone numbers and passwords`,
}, {
type: "malware", name: "Malware",
desc: `Software programs designed to cause harm to computer systems`,
}, {
type: "revenge_porn", name: "Revenge porn",
desc: `The distribution of sexually explicit images or videos of
individuals without their consent`,
},
]
let abuse_type = ""
let single_or_all = "single"
let loading = false
@@ -119,42 +158,13 @@ const report_description = () => {
Which type of abuse is shown in this file? Pick the most
appropriate one.
</p>
<label for="type_copyright" style="border-bottom: none;">
<input type="radio" bind:group={abuse_type} id="type_copyright" name="abuse_type" value="copyright">
<b>Copyright</b>: Protected content which is shared without constent
from the rightsholder
</label>
<label for="type_terrorism">
<input type="radio" bind:group={abuse_type} id="type_terrorism" name="abuse_type" value="terrorism">
<b>Terrorism</b>: Videos, images or audio fragments showing
or promoting the use of intentional violence to achieve
political aims
</label>
<label for="type_gore">
<input type="radio" bind:group={abuse_type} id="type_gore" name="abuse_type" value="gore">
<b>Gore</b>: Graphic and shocking videos or images depicting
severe harm to humans (or animals)
</label>
<label for="type_child_abuse">
<input type="radio" bind:group={abuse_type} id="type_child_abuse" name="abuse_type" value="child_abuse">
<b>Child abuse</b>: Videos or images depicting inappropriate
touching or nudity of minors
</label>
<label for="type_doxing">
<input type="radio" bind:group={abuse_type} id="type_doxing" name="doxing" value="doxing">
<b>Doxing</b>: Personally identifiable information uploaded without
the consent of the owner
</label>
<label for="type_malware">
<input type="radio" bind:group={abuse_type} id="type_malware" name="abuse_type" value="malware">
<b>Malware</b>: Software programs designed to cause harm to
computer systems
</label>
<label for="type_revenge_porn">
<input type="radio" bind:group={abuse_type} id="type_revenge_porn" name="abuse_type" value="revenge_porn">
<b>Revenge porn</b>: The distribution of sexually explicit images or
videos of individuals without their consent
</label>
{#each abuse_categories as cat}
<label for="type_{cat.type}">
<input type="radio" bind:group={abuse_type} id="type_{cat.type}" name="abuse_type" value="{cat.type}">
<b>{cat.name}</b>: {cat.desc}
</label>
{/each}
{#if list.id !== "" && file.id !== ""}
<h3>Report multiple files?</h3>