forked from coracle/flotilla
c43544734a
Closes #17 Co-authored-by: Jon Staab <shtaab@gmail.com> Reviewed-on: coracle/flotilla#78 Co-authored-by: triesap <tyson@radroots.org> Co-committed-by: triesap <tyson@radroots.org>
33 lines
1.0 KiB
Svelte
33 lines
1.0 KiB
Svelte
<script lang="ts">
|
|
import Link from "@lib/components/Link.svelte"
|
|
import CardButton from "@lib/components/CardButton.svelte"
|
|
import RelayIcon from "@app/components/RelayIcon.svelte"
|
|
import RelayName from "@app/components/RelayName.svelte"
|
|
import RelayDescription from "@app/components/RelayDescription.svelte"
|
|
import {makeSpacePath} from "@app/util/routes"
|
|
import {notifications} from "@app/util/notifications"
|
|
|
|
const {url} = $props()
|
|
|
|
const path = makeSpacePath(url)
|
|
</script>
|
|
|
|
<Link replaceState href={path}>
|
|
<CardButton class="btn-neutral shadow-md bg-alt rounded-box border-none">
|
|
{#snippet icon()}
|
|
<RelayIcon {url} size={12} class="rounded-full" />
|
|
{/snippet}
|
|
{#snippet title()}
|
|
<div class="flex gap-1">
|
|
<RelayName {url} />
|
|
{#if $notifications.has(path)}
|
|
<div class="relative top-1 h-2 w-2 rounded-full bg-primary"></div>
|
|
{/if}
|
|
</div>
|
|
{/snippet}
|
|
{#snippet info()}
|
|
<div><RelayDescription {url} /></div>
|
|
{/snippet}
|
|
</CardButton>
|
|
</Link>
|