2025-05-05 17:11:02 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import type {TrustedEvent} from "@welshman/util"
|
|
|
|
|
import {slide} from "@lib/transition"
|
2025-09-10 22:26:39 +00:00
|
|
|
import CloseCircle from "@assets/icons/close-circle.svg?dataurl"
|
2025-05-05 17:11:02 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
|
|
|
|
import Button from "@lib/components/Button.svelte"
|
2025-10-06 18:23:19 +00:00
|
|
|
import NoteContentMinimal from "@app/components/NoteContentMinimal.svelte"
|
2026-07-28 16:16:26 +00:00
|
|
|
import {profiles} from "@app/core"
|
2025-05-05 17:11:02 +00:00
|
|
|
|
2026-07-28 16:16:26 +00:00
|
|
|
type Props = {
|
2025-05-05 17:11:02 +00:00
|
|
|
verb: string
|
|
|
|
|
event: TrustedEvent
|
|
|
|
|
clear: () => void
|
2026-07-28 16:16:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {verb, event, clear}: Props = $props()
|
|
|
|
|
|
|
|
|
|
const display = $profiles.display(event.pubkey).$
|
2025-05-05 17:11:02 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div
|
2026-06-24 20:56:53 +00:00
|
|
|
class="bg-surface-more relative border-l-2 border-solid px-2 py-1 pr-8"
|
|
|
|
|
style="border-color: var(--primary)"
|
2025-05-05 17:11:02 +00:00
|
|
|
transition:slide>
|
2026-07-28 16:16:26 +00:00
|
|
|
<p class="text-primary text-xs">{verb} @{$display}</p>
|
2025-05-05 17:11:02 +00:00
|
|
|
{#key event.id}
|
2025-10-06 18:23:19 +00:00
|
|
|
<NoteContentMinimal trimParent {event} />
|
2025-05-05 17:11:02 +00:00
|
|
|
{/key}
|
|
|
|
|
<Button class="absolute right-2 top-2 cursor-pointer" onclick={clear}>
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon icon={CloseCircle} />
|
2025-05-05 17:11:02 +00:00
|
|
|
</Button>
|
|
|
|
|
</div>
|