Fix warning, hide images in quotes
This commit is contained in:
parent
af171bd2c9
commit
3e214881a3
3 changed files with 8 additions and 3 deletions
|
|
@ -152,8 +152,8 @@
|
||||||
{:else if isEvent(parsed) || isAddress(parsed)}
|
{:else if isEvent(parsed) || isAddress(parsed)}
|
||||||
{#if isBlock(i)}
|
{#if isBlock(i)}
|
||||||
<ContentQuote {...quoteProps} value={parsed.value} {event}>
|
<ContentQuote {...quoteProps} value={parsed.value} {event}>
|
||||||
{#snippet noteContent({event}: {event: TrustedEvent})}
|
{#snippet noteContent({event, minimal}: {event: TrustedEvent; minimal: boolean})}
|
||||||
<Content {quoteProps} {hideMedia} {event} depth={depth + 1} />
|
<Content {quoteProps} hideMedia={minimal || hideMedia} {event} depth={depth + 1} />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</ContentQuote>
|
</ContentQuote>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
<Button class="my-2 block max-w-full text-left" {onclick}>
|
<Button class="my-2 block max-w-full text-left" {onclick}>
|
||||||
{#if $quote}
|
{#if $quote}
|
||||||
<NoteCard {minimal} event={$quote} class="bg-alt rounded-box p-4">
|
<NoteCard {minimal} event={$quote} class="bg-alt rounded-box p-4">
|
||||||
{@render noteContent({event: $quote})}
|
{@render noteContent({event: $quote, minimal})}
|
||||||
</NoteCard>
|
</NoteCard>
|
||||||
{:else}
|
{:else}
|
||||||
<div class="rounded-box p-4">
|
<div class="rounded-box p-4">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import {onDestroy} from "svelte"
|
||||||
import {type Instance} from "tippy.js"
|
import {type Instance} from "tippy.js"
|
||||||
import type {NativeEmoji} from "emoji-picker-element/shared"
|
import type {NativeEmoji} from "emoji-picker-element/shared"
|
||||||
import {between, throttle} from "@welshman/lib"
|
import {between, throttle} from "@welshman/lib"
|
||||||
|
|
@ -26,6 +27,10 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
let popover: Instance | undefined = $state()
|
let popover: Instance | undefined = $state()
|
||||||
|
|
||||||
|
onDestroy(() => {
|
||||||
|
popover = undefined
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:document onmousemove={onMouseMove} />
|
<svelte:document onmousemove={onMouseMove} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue