Make show more replies work inline

This commit is contained in:
Jon Staab 2024-01-29 10:40:29 -08:00
parent 7b00ddd821
commit 6c902b7e8f
2 changed files with 6 additions and 4 deletions

View File

@ -25,6 +25,7 @@
- [x] Add status to listings
- [x] Fix initial message when opening conversation from a listing
- [x] Support frequency value in `price` tag for nip 99
- [x] Show all replies exands notes inline rather than opening the note
# 0.4.0

View File

@ -72,9 +72,8 @@
let actions = null
let collapsed = depth === 0
let ctx = uniqBy(prop("id"), context)
const showEntire = anchor === getIdOrAddress(event)
const interactive = !anchor || !showEntire
let showEntire = anchor === getIdOrAddress(event)
let interactive = !anchor || !showEntire
const onClick = e => {
const target = (e.detail?.target || e.target) as HTMLElement
@ -355,7 +354,9 @@
{#if hiddenReplies.length > 0}
<button
class="mb-2 mt-2 cursor-pointer rounded-md bg-gradient-to-l from-transparent to-cocoa py-2 text-lightest outline-0 transition-colors hover:bg-cocoa"
on:click={onClick}>
on:click={() => {
showEntire = true
}}>
<i class="fa fa-up-down pr-2 text-sm" />
Show {quantify(hiddenReplies.length, "other reply", "more replies")}
</button>