Add key signup, improve message listening

This commit is contained in:
Jon Staab
2024-10-17 10:34:13 -07:00
parent 1055a6d567
commit db0dbbf428
15 changed files with 288 additions and 158 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import {onMount} from "svelte"
import {page} from "$app/stores"
import {ctx, ago} from "@welshman/lib"
import {WEEK, ctx, ago} from "@welshman/lib"
import {WRAP} from "@welshman/util"
import {pubkey, subscribe} from "@welshman/app"
import {fly} from "@lib/transition"
@@ -26,7 +26,7 @@
onMount(() => {
const filter = {kinds: [WRAP], "#p": [$pubkey!]}
const relays = ctx.app.router.InboxRelays().getUrls()
const sub = subscribe({filters: [{...filter, since: ago(30)}], relays})
const sub = subscribe({filters: [{...filter, since: ago(WEEK)}], relays})
pullConservatively({filters: [filter], relays})
+1 -4
View File
@@ -21,7 +21,6 @@
loadInboxRelaySelections,
tagPubkey,
} from "@welshman/app"
import {fly} from "@lib/transition"
import Icon from "@lib/components/Icon.svelte"
import Link from "@lib/components/Link.svelte"
import Spinner from "@lib/components/Spinner.svelte"
@@ -155,9 +154,7 @@
{#if type === "date"}
<Divider>{value}</Divider>
{:else}
<div in:fly>
<ChatMessage event={assertEvent(value)} {pubkeys} {showPubkey} />
</div>
<ChatMessage event={assertEvent(value)} {pubkeys} {showPubkey} />
{/if}
{/each}
<p class="flex h-10 items-center justify-center py-20">