Fix failure to navigate, quote transitions
This commit is contained in:
@@ -79,10 +79,10 @@
|
||||
<div class="flex w-full gap-3 overflow-auto">
|
||||
{#if showPubkey}
|
||||
<Link external href={pubkeyLink(event.pubkey)} class="flex items-start">
|
||||
<Avatar src={$profile?.picture} class="border border-solid border-base-content" size={10} />
|
||||
<Avatar src={$profile?.picture} class="border border-solid border-base-content" size={8} />
|
||||
</Link>
|
||||
{:else}
|
||||
<div class="w-10 min-w-10 max-w-10" />
|
||||
<div class="w-8 min-w-8 max-w-8" />
|
||||
{/if}
|
||||
<div class="-mt-1 min-w-0 flex-grow pr-1">
|
||||
{#if showPubkey}
|
||||
@@ -105,7 +105,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-2 ml-12">
|
||||
<div class="row-2 ml-10 mt-1">
|
||||
{#if !isHead}
|
||||
<ReplySummary relays={[url]} {event} on:click={onClick} />
|
||||
{/if}
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
const isBlock = (i: number) => {
|
||||
const parsed = fullContent[i]
|
||||
|
||||
if (!parsed || hideMedia) return true
|
||||
if (!parsed || hideMedia) return false
|
||||
|
||||
if (isLink(parsed) && isStartOrEnd(i) && $userSettingValues.show_media) {
|
||||
if (isLink(parsed) && $userSettingValues.show_media && isStartOrEnd(i)) {
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -64,14 +64,18 @@
|
||||
const parsed = fullContent[i]
|
||||
|
||||
if (!parsed || isNewline(parsed)) return true
|
||||
if (isText(parsed)) return parsed.value.match(/^\s+$/)
|
||||
if (isText(parsed)) return Boolean(parsed.value.match(/^\s+$/))
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
const isStartAndEnd = (i: number) => Boolean(isBoundary(i - 1) && isBoundary(i + 1))
|
||||
const isStart = (i: number) => isBoundary(i - 1)
|
||||
|
||||
const isStartOrEnd = (i: number) => Boolean(isBoundary(i - 1) || isBoundary(i + 1))
|
||||
const isEnd = (i: number) => isBoundary(i + 1)
|
||||
|
||||
const isStartAndEnd = (i: number) => isStart(i) && isEnd(i)
|
||||
|
||||
const isStartOrEnd = (i: number) => isStart(i) || isEnd(i)
|
||||
|
||||
const ignoreWarning = () => {
|
||||
warning = null
|
||||
|
||||
@@ -24,10 +24,20 @@
|
||||
const entity = id ? nip19.neventEncode({id, relays}) : addr.toNaddr()
|
||||
|
||||
const scrollToEvent = (id: string) => {
|
||||
const element = document.querySelector(`[data-event="${id}"]`)
|
||||
const element = document.querySelector(`[data-event="${id}"]`) as any
|
||||
|
||||
if (element) {
|
||||
element.scrollIntoView({behavior: "smooth"})
|
||||
element.style =
|
||||
"filter: brightness(1.5); transition-property: all; transition-duration: 400ms;"
|
||||
|
||||
setTimeout(() => {
|
||||
element.style = "transition-property: all; transition-duration: 300ms;"
|
||||
}, 800)
|
||||
|
||||
setTimeout(() => {
|
||||
element.style = ""
|
||||
}, 800 + 400)
|
||||
}
|
||||
|
||||
return Boolean(element)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<button
|
||||
type="button"
|
||||
data-tip={tooltip}
|
||||
class="flex-inline btn btn-neutral btn-xs tooltip gap-1 rounded-full"
|
||||
class="flex-inline btn btn-neutral btn-xs tooltip tooltip-right gap-1 rounded-full"
|
||||
class:border={isOwn}
|
||||
class:border-solid={isOwn}
|
||||
class:border-primary={isOwn}
|
||||
|
||||
Reference in New Issue
Block a user