impr: replace amMod, amModOfAny, isAdmin, with profile class getters
This commit is contained in:
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>
|
||||
|
||||
Reference in new issue
Block a user