Merge pull request #130 from asimons04/LocalAdminModAll
Update Mod Menus to account for federated moderators - Hide 'reply with reason' if mod action is instance-only.
This commit is contained in:
3 files changed
+6
-5
No files matched your search
@@ -32,7 +32,7 @@
|
||||
</Button>
|
||||
{#if ($profile?.user && amMod($profile.user, item.community)) || ($profile?.user && isAdmin($profile.user))}
|
||||
<li class="px-4 py-1 my-1 text-xs text-slate-600 dark:text-zinc-400">
|
||||
Moderation {#if (!item.community.local) } (Instance Only) {/if}
|
||||
Moderation {#if (!item.community.local && !amMod($profile.user, item.community)) } (Instance Only) {/if}
|
||||
</li>
|
||||
<MenuButton color="success" on:click={() => remove(item)}>
|
||||
<Icon src={Trash} size="16" mini />
|
||||
@@ -44,7 +44,7 @@
|
||||
</MenuButton>
|
||||
{#if $profile?.user && $profile.user?.local_user_view.person.id != item.creator.id}
|
||||
<span class="px-4 py-1 my-1 text-xs text-slate-600 dark:text-zinc-400">
|
||||
User {#if (!item.community.local) } (Instance Only) {/if}
|
||||
User {#if (!item.community.local && !amMod($profile.user, item.community)) } (Instance Only) {/if}
|
||||
</span>
|
||||
<MenuButton
|
||||
color="dangerSecondary"
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</Button>
|
||||
{#if ($profile?.user && amMod($profile.user, item.community)) || ($profile?.user && isAdmin($profile.user))}
|
||||
<span class="px-4 py-1 my-1 text-xs text-slate-600 dark:text-zinc-400">
|
||||
Moderation {#if !item.community.local} (Instance Only) {/if}
|
||||
Moderation {#if !item.community.local && !amMod($profile.user, item.community)} (Instance Only) {/if}
|
||||
</span>
|
||||
<MenuButton
|
||||
color="warning"
|
||||
@@ -159,7 +159,7 @@
|
||||
</MenuButton>
|
||||
{#if $profile?.user && $profile.user.local_user_view.person.id != item.creator.id}
|
||||
<span class="px-4 py-1 my-1 text-xs text-slate-600 dark:text-zinc-400">
|
||||
User {#if !item.community.local} (Instance Only) {/if}
|
||||
User {#if !item.community.local && !amMod($profile.user, item.community)} (Instance Only) {/if}
|
||||
</span>
|
||||
<MenuButton
|
||||
color="dangerSecondary"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
import { removalTemplate } from '$lib/components/lemmy/moderation/moderation.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { fullCommunityName } from '$lib/util.js'
|
||||
import { amMod, isAdmin } from './moderation'
|
||||
|
||||
export let open: boolean
|
||||
export let item: PostView | CommentView | undefined = undefined
|
||||
@@ -201,7 +202,7 @@
|
||||
bind:value={reason}
|
||||
/>
|
||||
|
||||
{#if !removed}
|
||||
{#if !removed && ( amMod($profile.user, item.community) || (isAdmin($profile.user) && item.community.local))}
|
||||
<Checkbox bind:checked={commentReason}>Reply with reason</Checkbox>
|
||||
|
||||
{#if commentReason}
|
||||
|
||||
Reference in new issue
Block a user