feat: add information button in community list
This commit is contained in:
1 parent
05d26158f8
commit
3749bf3333
1 file changed
+16
-4
@@ -6,19 +6,28 @@
|
|||||||
ChatBubbleOvalLeftEllipsis,
|
ChatBubbleOvalLeftEllipsis,
|
||||||
Check,
|
Check,
|
||||||
Icon,
|
Icon,
|
||||||
|
InformationCircle,
|
||||||
PencilSquare,
|
PencilSquare,
|
||||||
Plus,
|
Plus,
|
||||||
UserGroup,
|
UserGroup,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
|
||||||
import { Button } from 'mono-svelte'
|
import { Button, Modal } from 'mono-svelte'
|
||||||
import { isSubscribed } from '$lib/util.js'
|
import { isSubscribed } from '$lib/util.js'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
import { addSubscription } from '$lib/lemmy/user.js'
|
import { addSubscription } from '$lib/lemmy/user.js'
|
||||||
|
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||||
|
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||||
|
|
||||||
export let community: CommunityView
|
export let community: CommunityView
|
||||||
|
|
||||||
|
let showInfo = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<Modal title="Community" bind:open={showInfo}>
|
||||||
|
<CommunityCard community_view={community} />
|
||||||
|
</Modal>
|
||||||
|
|
||||||
<div class="py-4 flex flex-col gap-1 text-sm max-w-full">
|
<div class="py-4 flex flex-col gap-1 text-sm max-w-full">
|
||||||
<div class="flex flex-row items-center">
|
<div class="flex flex-row items-center">
|
||||||
<span
|
<span
|
||||||
@@ -30,7 +39,10 @@
|
|||||||
community={community.community}
|
community={community.community}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
<div class="ml-auto">
|
<div class="ml-auto flex flex-row items-center gap-2">
|
||||||
|
<Button size="square-md" on:click={() => (showInfo = !showInfo)}>
|
||||||
|
<Icon src={InformationCircle} size="16" mini />
|
||||||
|
</Button>
|
||||||
<Subscribe {community} let:subscribe let:subscribing>
|
<Subscribe {community} let:subscribe let:subscribing>
|
||||||
<Button
|
<Button
|
||||||
disabled={subscribing || !$profile?.jwt}
|
disabled={subscribing || !$profile?.jwt}
|
||||||
@@ -71,8 +83,8 @@
|
|||||||
</Subscribe>
|
</Subscribe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="opacity-80 mb-2">
|
<span class="text-slate-600 dark:text-zinc-400 mb-2">
|
||||||
{new URL(community.community.actor_id).hostname}
|
!{community.community.name}@{new URL(community.community.actor_id).hostname}
|
||||||
</span>
|
</span>
|
||||||
<div class="flex flex-row gap-3 items-center">
|
<div class="flex flex-row gap-3 items-center">
|
||||||
<div class="flex flex-row gap-1 items-center">
|
<div class="flex flex-row gap-1 items-center">
|
||||||
|
|||||||
Reference in new issue
Block a user