Add zaps to threads/events

This commit is contained in:
Jon Staab
2025-07-15 15:56:55 -07:00
parent 00f383ff2e
commit d4b026a3ad
2 changed files with 9 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
import Icon from "@lib/components/Icon.svelte"
import Tippy from "@lib/components/Tippy.svelte"
import Button from "@lib/components/Button.svelte"
import ZapButton from "@app/components/ZapButton.svelte"
import EmojiButton from "@lib/components/EmojiButton.svelte"
import EventMenu from "@app/components/EventMenu.svelte"
import {publishReaction} from "@app/commands"
@@ -14,10 +15,11 @@
url: string
noun: string
event: TrustedEvent
hideZap?: boolean
customActions?: Snippet
}
const {url, noun, event, customActions}: Props = $props()
const {url, noun, event, hideZap, customActions}: Props = $props()
const showPopover = () => popover?.show()
@@ -30,6 +32,11 @@
</script>
<Button class="join rounded-full">
{#if !hideZap}
<ZapButton {url} {event} class="btn join-item btn-neutral btn-xs">
<Icon icon="bolt" size={4} />
</ZapButton>
{/if}
<EmojiButton {onEmoji} class="btn join-item btn-neutral btn-xs">
<Icon icon="smile-circle" size={4} />
</EmojiButton>

View File

@@ -30,6 +30,6 @@
{#if showActivity}
<EventActivity {url} {path} {event} />
{/if}
<EventActions {url} {event} noun="Goal" />
<EventActions {url} {event} hideZap noun="Goal" />
</div>
</div>