impr: replace amMod, amModOfAny, isAdmin, with profile class getters

This commit is contained in:
Xylight committed 2025-09-28 13:49:18 -07:00
1 parent e55d8abfa7
commit 8a217198ea
18 files changed
+89 -89

No files matched your search

@@ -14,7 +14,7 @@
import Comment from '../comment/Comment.svelte'
import { isCommentView, isPostView } from '../legacy/item'
import { Post } from '../post'
import { amMod, isAdmin, removalTemplate } from './moderation'
import { removalTemplate } from './moderation'
interface Props {
open: boolean
@@ -213,7 +213,7 @@
bind:value={reason}
/>
{#if !removed && profile.current?.user && (amMod(profile.current.user, item.community) || (isAdmin(profile.current.user) && item.community.local))}
{#if !removed}
<Switch bind:checked={commentReason}>
{$t('moderation.removeSubmission.withReason')}
</Switch>