diff --git a/.env b/.env index 5c855f6f..f3416918 100644 --- a/.env +++ b/.env @@ -8,6 +8,7 @@ VITE_PLATFORM_PRIVACY=https://flotilla.social/privacy VITE_PLATFORM_NAME=Flotilla VITE_PLATFORM_LOGO=static/logo.png VITE_PLATFORM_RELAYS= +VITE_PLATFORM_RELAYS_STRICT=false VITE_PLATFORM_ACCENT="#7161FF" VITE_THEME="clay" VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities." diff --git a/README.md b/README.md index fc5ab611..618baaa4 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can also optionally create an `.env.local` file and populate it with the fol **Defaults** - `VITE_DEFAULT_PUBKEYS` - A comma-separated list of hex pubkeys for bootstrapping web of trust -- `VITE_DEFAULT_SPACES` - A comma-separated list of relay urls that new users will be automatically joined to on signup +- `VITE_DEFAULT_SPACES` - A comma-separated list of relay urls that new users will be automatically joined to on signup. Each one may optionally include an invite code, delimited by `|`, e.g. `my.space.com|CODE`. - `VITE_DEFAULT_RELAYS` - A comma-separated list of relay urls used as default outbox/inbox relays - `VITE_DEFAULT_MESSAGING_RELAYS` - A comma-separated list of relay urls used for encrypted direct messages - `VITE_DEFAULT_BLOSSOM_SERVERS` - A comma-separated list of blossom server urls used for file uploads diff --git a/src/app/components/LogInEmail.svelte b/src/app/components/LogInEmail.svelte index 419d9abb..ad8da6e8 100644 --- a/src/app/components/LogInEmail.svelte +++ b/src/app/components/LogInEmail.svelte @@ -114,7 +114,7 @@ {/snippet}
- Forgot your password? .
diff --git a/src/app/components/RelayDescription.svelte b/src/app/components/RelayDescription.svelte index 7e67c7ac..82d4789a 100644 --- a/src/app/components/RelayDescription.svelte +++ b/src/app/components/RelayDescription.svelte @@ -1,11 +1,16 @@ {#if $relay?.description} -{$relay.description}
+{url}
-+
- Unable to reach the relay. Please check your connection and try again. +
+ Unable to reach the space. Please check your connection and try again.
{:else if isExplicitAuthError} -- Oops! It looks like you're not a member of this relay. +
+ Oops! It looks like you're not a member of this space.
{:else}
This space has opted not to publish
- Your public key is your nostr user identifier. It also allows other people to authenticate + Your public key is your user identifier. It also allows other people to authenticate your messages.
{/snippet} diff --git a/src/routes/spaces/[relay]/+layout.svelte b/src/routes/spaces/[relay]/+layout.svelte index b1e26e21..e0a35964 100644 --- a/src/routes/spaces/[relay]/+layout.svelte +++ b/src/routes/spaces/[relay]/+layout.svelte @@ -13,7 +13,7 @@ import SpaceAuthError from "@app/components/SpaceAuthError.svelte" import SpaceTrustRelay from "@app/components/SpaceTrustRelay.svelte" import SpaceJoin from "@app/components/SpaceJoin.svelte" - import {pushModal} from "@app/modal" + import {modal, pushModal} from "@app/modal" import {makeSpacePath} from "@app/routes" import {decodeRelay, deriveRelayAuthError} from "@app/relays" import {userGroupList, userSpaceUrls} from "@app/groups" @@ -35,34 +35,19 @@ const showPendingTrust = once(() => pushModal(SpaceTrustRelay, {url}, {noEscape: true})) - // Watch for relay errors and notify the user - $effect(() => { - if ($authError) { - showAuthError() - } else if ($relaysPendingTrust.includes(url)) { - showPendingTrust() - } - }) - - // Direct links skip Discover — prompt to join when relay is not in the user's space list. - const shouldPromptJoin = $derived.by(() => { + // Watch for relay errors and notify the user + // Direct links skip Discover — prompt to join when relay is not in the user's space list. + $effect(() => { void $userGroupList - return ( - Boolean($pubkey) && - !$userSpaceUrls.includes(url) && - !$authError && - !$relaysPendingTrust.includes(url) - ) - }) + if ($modal) return + if ($authError) return showAuthError() + if ($relaysPendingTrust.includes(url)) return showPendingTrust() - $effect(() => { - if (!shouldPromptJoin || joinPrompted.has(url)) { - return + if (!$userSpaceUrls.includes(url)) { + joinPrompted.add(url) + pushModal(SpaceJoin, {url}) } - - joinPrompted.add(url) - pushModal(SpaceJoin, {url}) })