feat: add moderator view
This commit is contained in:
1 parent
119ab53946
commit
6f04766408
1 file changed
+7
@@ -11,6 +11,7 @@
|
|||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
||||||
import { site } from '$lib/lemmy.js'
|
import { site } from '$lib/lemmy.js'
|
||||||
|
import { amModOfAny } from '$lib/components/lemmy/moderation/moderation.js'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
|
|
||||||
@@ -64,6 +65,12 @@
|
|||||||
<option value="All">All</option>
|
<option value="All">All</option>
|
||||||
<option value="Local">Local</option>
|
<option value="Local">Local</option>
|
||||||
<option value="Subscribed" disabled={!$profile?.jwt}>Subscribed</option>
|
<option value="Subscribed" disabled={!$profile?.jwt}>Subscribed</option>
|
||||||
|
<option
|
||||||
|
value="ModeratorView"
|
||||||
|
disabled={!$profile?.jwt || !amModOfAny($profile?.user)}
|
||||||
|
>
|
||||||
|
Moderator
|
||||||
|
</option>
|
||||||
</Select>
|
</Select>
|
||||||
<div class="flex gap-4 flex-wrap">
|
<div class="flex gap-4 flex-wrap">
|
||||||
<Sort selected={data.sort} />
|
<Sort selected={data.sort} />
|
||||||
|
|||||||
Reference in new issue
Block a user