feat: add removal templates
This commit is contained in:
1 parent
147349d0c2
commit
9fd32aa7dd
9 files changed
+97
-10
No files matched your search
@@ -65,7 +65,7 @@
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<aside class="hidden xl:block">
|
||||
<div class="hidden xl:block">
|
||||
{#await data.streamed.site}
|
||||
<StickyCard>
|
||||
<div class="h-64 grid place-items-center">
|
||||
@@ -79,5 +79,5 @@
|
||||
<h1 class="font-bold text-lg">Failed to load</h1>
|
||||
</StickyCard>
|
||||
{/await}
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,6 +11,9 @@
|
||||
import SectionTitle from '$lib/components/ui/SectionTitle.svelte'
|
||||
import Link from '$lib/components/input/Link.svelte'
|
||||
import { ArrowLeftCircle, ArrowPath, Icon } from 'svelte-hero-icons'
|
||||
import TextArea from '$lib/components/input/TextArea.svelte'
|
||||
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
||||
|
||||
let data = {
|
||||
loading: false,
|
||||
@@ -143,4 +146,43 @@
|
||||
</Checkbox>
|
||||
</div>
|
||||
</Setting>
|
||||
|
||||
<SectionTitle class="mt-4">Moderation</SectionTitle>
|
||||
<Setting>
|
||||
<span slot="title">Removal reply preset</span>
|
||||
<span slot="description">
|
||||
<p>The preset to use for "Reply reason" in a submission removal.</p>
|
||||
<ul class="leading-6">
|
||||
<li>Syntax:</li>
|
||||
<li>
|
||||
<code>{'{{reason}}'}</code>
|
||||
: The provided reason
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{post}}'}</code>
|
||||
: The title of the post
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{community}}'}</code>
|
||||
: The community the submission was removed in.
|
||||
</li>
|
||||
<li>
|
||||
<code>{'{{username}}'}</code>
|
||||
: The username of the creator of the submission.
|
||||
</li>
|
||||
</ul>
|
||||
</span>
|
||||
<MarkdownEditor
|
||||
bind:value={$userSettings.moderation.removalReasonPreset}
|
||||
images={false}
|
||||
previewButton
|
||||
beforePreview={(input) =>
|
||||
removalTemplate(input, {
|
||||
postTitle: '<Example post>',
|
||||
communityLink: '[!community@example.com]()',
|
||||
reason: '<Being a meanie>',
|
||||
username: '@Bob',
|
||||
})}
|
||||
/>
|
||||
</Setting>
|
||||
</div>
|
||||
Reference in new issue
Block a user