feat: add modlog to community carddd

This commit is contained in:
Xyphyn committed 2023-10-12 15:57:49 -07:00
1 parent 3749bf3333
commit 8e679dfee2
1 file changed
+29 -22
@@ -31,6 +31,7 @@
Fire, Fire,
Icon, Icon,
Minus, Minus,
Newspaper,
NoSymbol, NoSymbol,
PencilSquare, PencilSquare,
Plus, Plus,
@@ -210,10 +211,10 @@
</div> </div>
{/if} {/if}
<Markdown source={community_view.community.description} /> <Markdown source={community_view.community.description} />
{#if $profile?.jwt} <div
<div class="flex flex-row items-center gap-2 sticky bottom-0 drop-shadow-xl w-full"
class="flex flex-row items-center gap-2 sticky bottom-0 drop-shadow-xl" >
> {#if $profile?.jwt}
<Button <Button
disabled={loading.subscribing} disabled={loading.subscribing}
loading={loading.subscribing} loading={loading.subscribing}
@@ -238,21 +239,27 @@
? 'Subscribed' ? 'Subscribed'
: 'Subscribe'} : 'Subscribe'}
</Button> </Button>
{#if $profile?.user && amMod($profile.user, community_view.community)} {/if}
<Button {#if $profile?.user && amMod($profile.user, community_view.community)}
href="/c/{fullCommunityName( <Button
community_view.community.name, href="/c/{fullCommunityName(
community_view.community.actor_id community_view.community.name,
)}/settings" community_view.community.actor_id
size="square-md" )}/settings"
> size="square-md"
<Icon src={Cog6Tooth} mini size="16" slot="prefix" /> >
</Button> <Icon src={Cog6Tooth} mini size="16" slot="prefix" />
{/if} </Button>
<Menu placement="bottom-end"> {/if}
<Button size="square-md" slot="target"> <Menu placement="top-end">
<Icon src={EllipsisHorizontal} size="16" mini slot="prefix" /> <Button size="square-md" slot="target" class="ml-auto">
</Button> <Icon src={EllipsisHorizontal} size="16" mini slot="prefix" />
</Button>
<MenuButton href="/modlog?community={community_view.community.id}">
<Icon src={Newspaper} size="16" mini />
Modlog
</MenuButton>
{#if $profile?.jwt}
<MenuButton color="danger-subtle" size="lg" on:click={block}> <MenuButton color="danger-subtle" size="lg" on:click={block}>
<Icon src={NoSymbol} size="16" mini slot="prefix" /> <Icon src={NoSymbol} size="16" mini slot="prefix" />
{community_view.blocked ? 'Unblock' : 'Block'} {community_view.blocked ? 'Unblock' : 'Block'}
@@ -266,7 +273,7 @@
Purge Purge
</MenuButton> </MenuButton>
{/if} {/if}
</Menu> {/if}
</div> </Menu>
{/if} </div>
</StickyCard> </StickyCard>