feat: add 'feature' options
This commit is contained in:
1 parent
e28ab154d9
commit
24c0c248f3
5 files changed
+46
-21
No files matched your search
@@ -12,6 +12,7 @@
|
||||
import ViewSelect from '$lib/components/lemmy/ViewSelect.svelte'
|
||||
import { site } from '$lib/lemmy.js'
|
||||
import { amModOfAny } from '$lib/components/lemmy/moderation/moderation.js'
|
||||
import { feature } from '$lib/version.js'
|
||||
|
||||
export let data
|
||||
|
||||
@@ -65,12 +66,14 @@
|
||||
<option value="All">All</option>
|
||||
<option value="Local">Local</option>
|
||||
<option value="Subscribed" disabled={!$profile?.jwt}>Subscribed</option>
|
||||
<option
|
||||
value="ModeratorView"
|
||||
disabled={!$profile?.jwt || !amModOfAny($profile?.user)}
|
||||
>
|
||||
Moderator
|
||||
</option>
|
||||
{#if feature('moderatorView', $site?.version)}
|
||||
<option
|
||||
value="ModeratorView"
|
||||
disabled={!$profile?.jwt || !amModOfAny($profile?.user)}
|
||||
>
|
||||
Moderator
|
||||
</option>
|
||||
{/if}
|
||||
</Select>
|
||||
<div class="flex gap-4 flex-wrap">
|
||||
<Sort selected={data.sort} />
|
||||
|
||||
Reference in new issue
Block a user