diff --git a/src/app.css b/src/app.css index fdad133..3112795 100644 --- a/src/app.css +++ b/src/app.css @@ -46,6 +46,14 @@ @apply p-6 bg-base-100 text-base-content rounded-box; } +.card2.card2-sm { + @apply p-4 bg-base-100 text-base-content rounded-box; +} + +.card2.card2-alt { + @apply bg-base-300; +} + .column { @apply flex flex-col; } diff --git a/src/app/components/GroupCompose.svelte b/src/app/components/GroupCompose.svelte index 4af5ea5..25019e0 100644 --- a/src/app/components/GroupCompose.svelte +++ b/src/app/components/GroupCompose.svelte @@ -160,7 +160,7 @@ }) -
+
-

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}
+
Chat