2025-02-12 00:00:14 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import {fromPairs} from "@welshman/lib"
|
|
|
|
|
import type {TrustedEvent} from "@welshman/util"
|
2025-09-10 22:26:39 +00:00
|
|
|
import UserCircle from "@assets/icons/user-circle.svg?dataurl"
|
|
|
|
|
import MapPoint from "@assets/icons/map-point.svg?dataurl"
|
2025-02-12 00:00:14 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
|
|
|
|
import ProfileLink from "@app/components/ProfileLink.svelte"
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
event: TrustedEvent
|
2025-04-15 18:03:27 +00:00
|
|
|
url: string
|
2025-02-12 00:00:14 +00:00
|
|
|
}
|
|
|
|
|
|
2025-04-15 18:03:27 +00:00
|
|
|
const {event, url}: Props = $props()
|
2025-02-12 00:00:14 +00:00
|
|
|
const meta = $derived(fromPairs(event.tags) as Record<string, string>)
|
|
|
|
|
</script>
|
|
|
|
|
|
2025-03-17 16:53:14 +00:00
|
|
|
<div class="flex min-w-0 flex-col gap-1 text-sm opacity-75">
|
2025-02-12 00:00:14 +00:00
|
|
|
<span class="flex items-center gap-1">
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon icon={UserCircle} size={4} />
|
2025-04-15 18:03:27 +00:00
|
|
|
Posted by <ProfileLink pubkey={event.pubkey} {url} />
|
2025-02-12 00:00:14 +00:00
|
|
|
</span>
|
2025-03-17 16:53:14 +00:00
|
|
|
{#if meta.location}
|
2025-03-18 22:36:52 +00:00
|
|
|
<span class="flex items-start gap-1">
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon icon={MapPoint} class="mt-[2px]" size={4} />
|
2026-04-07 21:53:19 +00:00
|
|
|
<span class="wrap-break-word">{meta.location}</span>
|
2025-03-17 16:53:14 +00:00
|
|
|
</span>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|