-
Support development
+
Support development
Funds will be used to support development.
-
Get in touch
+
Get in touch
Having problems? Let us know by filing an issue.
+ import {onMount} from 'svelte'
+ import {readable} from 'svelte/store'
+ import {displayRelayUrl, isShareableRelayUrl} from '@welshman/util'
+ import type {SignedEvent} from '@welshman/util'
+ import Button from "@lib/components/Button.svelte"
+ import Link from "@lib/components/Link.svelte"
+ import Icon from "@lib/components/Icon.svelte"
+ import {clip} from "@app/toast"
+ import {DEFAULT_RELAYS, INDEXER_RELAYS} from "@app/base"
+ import {searchRelays, subscribe, loadRelay} from "@app/state"
+
+ const relays = readable(DEFAULT_RELAYS)
+
+ const removeRelay = (url: string) => null
+
+ const addRelay = (url: string) => null
+
+ let term = ""
+
+ onMount(() => {
+ const sub = subscribe({
+ filters: [{kinds: [30166], '#N': ['29']}],
+ relays: [...INDEXER_RELAYS, ...DEFAULT_RELAYS],
+ })
+
+ sub.emitter.on('event', (url: string, event: SignedEvent) => {
+ const d = event.tags.find(t => t[0] === 'd')?.[1] || ""
+
+ if (isShareableRelayUrl(d)) {
+ loadRelay(d)
+ }
+ })
+
+ return () => sub.close()
+ })
+
+
+
+
Relays
+
Get connected with the nostr network
+ {#each $relays as url}
+
+
+
+ {displayRelayUrl(url)}
+
+
+
+ {/each}
+
+ {#each $searchRelays.searchValues(term).filter(url => !$relays.includes(url)) as url (url)}
+
+
+
+ {displayRelayUrl(url)}
+
+
+
+ {/each}
+
diff --git a/src/routes/spaces/[nom]/+layout.svelte b/src/routes/spaces/[nom]/+layout.svelte
index d0582d8..2341460 100644
--- a/src/routes/spaces/[nom]/+layout.svelte
+++ b/src/routes/spaces/[nom]/+layout.svelte
@@ -64,6 +64,7 @@
{/if}