From a5d34630729070c5e77bd58380a3f703acbce7e6 Mon Sep 17 00:00:00 2001 From: xylight <80978739+Xyphyn@users.noreply.github.com> Date: Sat, 15 Nov 2025 21:44:49 -0800 Subject: [PATCH] feat: add report presets, close #682 (#685) --- src/lib/app/i18n/en.json | 7 +++- src/lib/feature/moderation/ReportModal.svelte | 38 ++++++++++++------- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/src/lib/app/i18n/en.json b/src/lib/app/i18n/en.json index df84c6a6..9db15129 100644 --- a/src/lib/app/i18n/en.json +++ b/src/lib/app/i18n/en.json @@ -616,7 +616,12 @@ }, "reportModal": { "title": "Report", - "success": "Reported that submission." + "success": "Reported that submission.", + "presets": { + "spam": "Spam/abuse", + "rules": "Breaks community rules", + "rules.content": "This submission breaks the rules because __" + } }, "reason": "Reason", "lock": "Lock", diff --git a/src/lib/feature/moderation/ReportModal.svelte b/src/lib/feature/moderation/ReportModal.svelte index 1f7fceaf..6a110916 100644 --- a/src/lib/feature/moderation/ReportModal.svelte +++ b/src/lib/feature/moderation/ReportModal.svelte @@ -10,10 +10,12 @@ import { t } from '$lib/app/i18n' import MarkdownEditor from '$lib/app/markdown/MarkdownEditor.svelte' import { Button, Modal, toast } from 'mono-svelte' + import ButtonGroup from 'mono-svelte/button/ButtonGroup.svelte' + import { Plus } from 'svelte-hero-icons/dist' import { preventDefault, run } from 'svelte/legacy' - import Comment from '../comment/Comment.svelte' + import CommentItem from '../comment/CommentItem.svelte' import PrivateMessage from '../inbox/PrivateMessage.svelte' - import { Post } from '../post' + import PostItem from '../post/PostItem.svelte' interface Props { open: boolean @@ -84,18 +86,9 @@ {#if item}
{#if isComment(item)} - + {:else if isPost(item)} - + {:else} {/if} @@ -107,6 +100,25 @@ label={$t('moderation.reason')} bind:value={reason} /> + + + +