diff --git a/src/routes/spaces/[relay]/+page.svelte b/src/routes/spaces/[relay]/+page.svelte index 94bde16f..b57e9a77 100644 --- a/src/routes/spaces/[relay]/+page.svelte +++ b/src/routes/spaces/[relay]/+page.svelte @@ -40,56 +40,56 @@ - {#if pubkey} -
-
-
-
-
-
- {#if $relay?.profile?.icon} - - {:else} - - {/if} -
+
+
+
+
+
+
+ {#if $relay?.profile?.icon} + + {:else} + + {/if}
-
-

- -

-

{url}

-
- - {#if $relay?.profile} - {@const {software, version, supported_nips, limitation} = $relay.profile} -
- {#if limitation?.auth_required} -

Authentication Required

- {/if} - {#if limitation?.payment_required} -

Payment Required

- {/if} - {#if limitation?.min_pow_difficulty} -

Requires PoW {limitation?.min_pow_difficulty}

- {/if} - {#if supported_nips} -

NIPs: {supported_nips.join(", ")}

- {/if} - {#if software} -

Software: {software}

- {/if} - {#if version} -

Version: {version}

- {/if} -
- {/if} +
+

+ +

+

{url}

+
+ + {#if $relay?.profile} + {@const {software, version, supported_nips, limitation} = $relay.profile} +
+ {#if limitation?.auth_required} +

Authentication Required

+ {/if} + {#if limitation?.payment_required} +

Payment Required

+ {/if} + {#if limitation?.min_pow_difficulty} +

Requires PoW {limitation?.min_pow_difficulty}

+ {/if} + {#if supported_nips} +

NIPs: {supported_nips.join(", ")}

+ {/if} + {#if software} +

Software: {software}

+ {/if} + {#if version} +

Version: {version}

+ {/if} +
+ {/if} +
+ {#if pubkey} Recent posts from the relay admin -
- {/if} + {/if} +
diff --git a/src/routes/spaces/[relay]/[room]/+page.svelte b/src/routes/spaces/[relay]/[room]/+page.svelte index b69a4b52..4e9fcb1e 100644 --- a/src/routes/spaces/[relay]/[room]/+page.svelte +++ b/src/routes/spaces/[relay]/[room]/+page.svelte @@ -11,7 +11,7 @@ import {onMount} from "svelte" import {page} from "$app/stores" import {writable} from "svelte/store" - import {sortBy, now, assoc, append} from "@welshman/lib" + import {sortBy, ago, assoc, append} from "@welshman/lib" import type {TrustedEvent, EventContent} from "@welshman/util" import {createEvent} from "@welshman/util" import {formatTimestampAsDate, publishThunk} from "@welshman/app" @@ -94,7 +94,12 @@ } onMount(() => { - return subscribePersistent({filters: [{"#~": [room], since: now()}], relays: [url]}) + const unsub = subscribePersistent({ + filters: [{"#~": [room], since: ago(30)}], + relays: [url], + }) + + return () => unsub() }) setTimeout(() => { diff --git a/src/routes/spaces/[relay]/threads/+page.svelte b/src/routes/spaces/[relay]/threads/+page.svelte index e76335e1..b71ea993 100644 --- a/src/routes/spaces/[relay]/threads/+page.svelte +++ b/src/routes/spaces/[relay]/threads/+page.svelte @@ -1,7 +1,7 @@ -
+
@@ -79,7 +80,7 @@
-
+
{#each $events.slice(0, limit) as event (event.id)} {#if !event.tags.some(nthEq(0, "e")) && !mutedPubkeys.includes(event.pubkey)}