feat: add moderation tools (#33)

* feat: Add post submission removal

* feat: add comment submission removal

* feat: add report viewing and resolving

* misc: add notification dot

* misc: add locked thread badge

* feat: add thread locking

* feat: add initiating message conversations

* feat: add post pinning/unpinning

* misc: bump version

* fix: tweak lock colors

* fix: update post data on pin

* fix: return if reason is empty
This commit is contained in:
Xylight authored and GitHub committed 2023-07-27 15:53:31 -07:00
1 parent 53ef843cde
commit d3aae647a8
29 files changed
+835 -67

No files matched your search

+22 -2
View File
@@ -5,7 +5,13 @@
import UserLink from '$lib/components/lemmy/user/UserLink.svelte'
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
import type { Community, Person } from 'lemmy-js-client'
import { Bookmark, Icon, InformationCircle, Trash } from 'svelte-hero-icons'
import {
Bookmark,
Icon,
InformationCircle,
LockClosed,
Trash,
} from 'svelte-hero-icons'
export let community: Community
export let user: Person | undefined = undefined
@@ -20,13 +26,17 @@
export let saved: boolean
export let featured: boolean
export let deleted: boolean
export let removed: boolean = false
export let locked: boolean = false
</script>
<span class="flex flex-row gap-2 text-sm items-center">
<Avatar url={community.icon} width={24} alt={community.name} />
<div class="flex flex-col text-xs">
<CommunityLink {community} />
<span class="text-slate-600 dark:text-zinc-400 flex flex-row gap-1 flex-wrap">
<span
class="text-slate-600 dark:text-zinc-400 flex flex-row gap-1 flex-wrap"
>
{#if user}
<UserLink {user} />
<span>•</span>
@@ -50,6 +60,16 @@
<Icon src={Bookmark} mini width={16} />
</Badge>
{/if}
{#if locked}
<Badge class="bg-yellow-400 text-black py-1" label="Locked">
<Icon src={LockClosed} mini width={16} />
</Badge>
{/if}
{#if removed}
<Badge class="bg-green-600 text-white py-1" label="Removed">
<Icon src={Trash} mini width={16} />
</Badge>
{/if}
{#if deleted}
<Badge class="bg-red-600 text-white py-1" label="Deleted">
<Icon src={Trash} mini width={16} />