2024-10-15 21:00:15 +00:00
|
|
|
<script lang="ts">
|
2024-10-15 22:52:30 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
|
|
|
|
import Button from "@lib/components/Button.svelte"
|
2024-10-15 21:00:15 +00:00
|
|
|
import ChatMessageEmojiButton from "@app/components/ChatMessageEmojiButton.svelte"
|
2024-10-15 22:52:30 +00:00
|
|
|
import EventInfo from "@app/components/EventInfo.svelte"
|
2026-06-08 21:14:40 +00:00
|
|
|
import {pushModal} from "@app/modal"
|
2026-03-10 22:13:33 +00:00
|
|
|
import Pen from "@assets/icons/pen.svg?dataurl"
|
2025-09-10 22:26:39 +00:00
|
|
|
import Reply from "@assets/icons/reply-2.svg?dataurl"
|
|
|
|
|
import Code2 from "@assets/icons/code-2.svg?dataurl"
|
2024-10-15 21:00:15 +00:00
|
|
|
|
2026-08-29 17:20:39 +00:00
|
|
|
const {event, pubkeys, tippy, replyTo, edit} = $props()
|
2024-11-19 21:24:18 +00:00
|
|
|
|
|
|
|
|
const reply = () => replyTo(event)
|
2026-03-10 22:13:33 +00:00
|
|
|
const onEdit = () => edit?.()
|
2024-10-15 21:00:15 +00:00
|
|
|
|
|
|
|
|
const showInfo = () => {
|
2026-08-29 17:20:39 +00:00
|
|
|
tippy.hide()
|
2024-10-15 21:00:15 +00:00
|
|
|
pushModal(EventInfo, {event})
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-06-24 20:56:53 +00:00
|
|
|
<div class="join text-xs">
|
2024-10-15 21:00:15 +00:00
|
|
|
<ChatMessageEmojiButton {event} {pubkeys} />
|
2024-11-19 21:24:18 +00:00
|
|
|
{#if replyTo}
|
2026-09-12 17:03:24 +00:00
|
|
|
<Button aria-label="Reply" class="button button-neutral button-xs join-item" onclick={reply}>
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon size={4} icon={Reply} />
|
2024-11-19 21:24:18 +00:00
|
|
|
</Button>
|
|
|
|
|
{/if}
|
2026-03-10 22:13:33 +00:00
|
|
|
{#if edit}
|
2026-09-12 17:03:24 +00:00
|
|
|
<Button aria-label="Edit" class="button button-neutral button-xs join-item" onclick={onEdit}>
|
2026-03-10 22:13:33 +00:00
|
|
|
<Icon size={4} icon={Pen} />
|
|
|
|
|
</Button>
|
|
|
|
|
{/if}
|
2026-09-12 17:03:24 +00:00
|
|
|
<Button
|
|
|
|
|
aria-label="Message info"
|
|
|
|
|
class="button button-neutral button-xs join-item"
|
|
|
|
|
onclick={showInfo}>
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon size={4} icon={Code2} />
|
2024-10-15 21:00:15 +00:00
|
|
|
</Button>
|
|
|
|
|
</div>
|