Switch to pnpm, use new welshman stuff

This commit is contained in:
Jon Staab
2025-04-09 15:32:18 -07:00
parent 33902dbefe
commit 489707b9b2
29 changed files with 9413 additions and 15744 deletions
+16 -4
View File
@@ -5,7 +5,9 @@
import {REACTION, getTag, REPORT, DELETE} from "@welshman/util"
import type {TrustedEvent} from "@welshman/util"
import {deriveEvents} from "@welshman/store"
import {pubkey, repository, load, displayProfileByPubkey} from "@welshman/app"
import type {MultiRequest} from "@welshman/net"
import {load, request, RequestEvent} from "@welshman/net"
import {pubkey, repository, displayProfileByPubkey} from "@welshman/app"
import {displayList} from "@lib/util"
import {isMobile, preventDefault, stopPropagation} from "@lib/html"
import Icon from "@lib/components/Icon.svelte"
@@ -51,17 +53,27 @@
)
onMount(() => {
let req: MultiRequest
if (url) {
load({
req = request({
relays: [url],
filters: [{kinds: [REACTION, REPORT, DELETE], "#e": [event.id]}],
onEvent: batch(300, (events: TrustedEvent[]) => {
})
req.on(
RequestEvent.Event,
batch(300, (events: TrustedEvent[]) => {
load({
relays: [url],
filters: [{kinds: [DELETE], "#e": events.map(e => e.id)}],
})
}),
})
)
}
return () => {
req?.close()
}
})
</script>