flotilla/src/app/components/ChatMessageMenu.svelte

31 lines
964 B
Svelte
Raw Normal View History

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"
import {pushModal} from "@app/util/modal"
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
const {event, pubkeys, popover, replyTo} = $props()
const reply = () => replyTo(event)
2024-10-15 21:00:15 +00:00
const showInfo = () => {
popover.hide()
pushModal(EventInfo, {event})
}
</script>
<div class="join border border-solid border-neutral text-xs">
<ChatMessageEmojiButton {event} {pubkeys} />
{#if replyTo}
<Button class="btn join-item btn-xs" onclick={reply}>
2025-09-10 22:26:39 +00:00
<Icon size={4} icon={Reply} />
</Button>
{/if}
<Button class="btn join-item btn-xs" 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>