Open a note from anywhere on its card (#630)

This commit is contained in:
Coracle-Bot 2026-09-23 03:48:41 +00:00 committed by hodlbod
parent a677fa5911
commit cfc30803b4
2 changed files with 10 additions and 21 deletions

View file

@ -23,12 +23,10 @@
const goToReplies = () => goToEvent(event) const goToReplies = () => goToEvent(event)
</script> </script>
<div class="card card-interactive flex flex-col gap-3"> <NoteItem {event} {context}>
<NoteItem {event} {context} card={false} interactive>
<Button class="button button-neutral button-xs rounded-full" onclick={goToReplies}> <Button class="button button-neutral button-xs rounded-full" onclick={goToReplies}>
<Icon icon={Reply} size={4} /> <Icon icon={Reply} size={4} />
{replyCount} {replyCount}
{replyCount === 1 ? "reply" : "replies"} {replyCount === 1 ? "reply" : "replies"}
</Button> </Button>
</NoteItem> </NoteItem>
</div>

View file

@ -13,19 +13,10 @@
context: FeedContext context: FeedContext
url?: string url?: string
card?: boolean card?: boolean
interactive?: boolean
showEntire?: boolean showEntire?: boolean
} }
const { const {url, event, children, context, card = true, showEntire = false}: Props = $props()
url,
event,
children,
context,
card = true,
interactive = card,
showEntire = false,
}: Props = $props()
</script> </script>
{#snippet body()} {#snippet body()}
@ -37,11 +28,11 @@
{/snippet} {/snippet}
{#if card} {#if card}
<Cv tag={NoteCard} {event} {url} {interactive} class="card card-interactive"> <Cv tag={NoteCard} {event} {url} interactive class="card card-interactive">
{@render body()} {@render body()}
</Cv> </Cv>
{:else} {:else}
<NoteCard {event} {url} {interactive}> <NoteCard {event} {url}>
{@render body()} {@render body()}
</NoteCard> </NoteCard>
{/if} {/if}