diff --git a/.env.template b/.env.template index e884d2b..8e49764 100644 --- a/.env.template +++ b/.env.template @@ -5,7 +5,7 @@ VITE_PLATFORM_TERMS=https://flotilla.social/terms VITE_PLATFORM_PRIVACY=https://flotilla.social/privacy VITE_PLATFORM_NAME=Flotilla VITE_PLATFORM_LOGO=static/flotilla.png -VITE_PLATFORM_RELAY= +VITE_PLATFORM_RELAYS= VITE_PLATFORM_ACCENT="#7161FF" VITE_PLATFORM_SECONDARY="#EB5E28" VITE_PLATFORM_DESCRIPTION="Flotilla is nostr — for communities." diff --git a/README.md b/README.md index c18b2c4..6371aa3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ You can also optionally create an `.env` file and populate it with the following - `VITE_PLATFORM_URL` - The url where the app will be hosted. This is only used for build-time population of meta tags. - `VITE_PLATFORM_NAME` - The name of the app - `VITE_PLATFORM_LOGO` - A logo url for the app -- `VITE_PLATFORM_RELAY` - A relay url that will make flotilla operate in "platform mode". Disables all space browse/add/select functionality and makes the platform relay the home page. +- `VITE_PLATFORM_RELAYS` - A list of comma-separated relay urls that will make flotilla operate in "platform mode". Disables all space browse/add/select functionality and makes the first platform relay the home page. - `VITE_PLATFORM_ACCENT` - A hex color for the app's accent color - `VITE_PLATFORM_DESCRIPTION` - A description of the app - `VITE_GLITCHTIP_API_KEY` - A Sentry DSN for use with glitchtip (error reporting) diff --git a/src/app/components/MenuSpaces.svelte b/src/app/components/MenuSpaces.svelte index 6cdf0c7..406e07b 100644 --- a/src/app/components/MenuSpaces.svelte +++ b/src/app/components/MenuSpaces.svelte @@ -5,30 +5,34 @@ import CardButton from "@lib/components/CardButton.svelte" import MenuSpacesItem from "@app/components/MenuSpacesItem.svelte" import SpaceAdd from "@app/components/SpaceAdd.svelte" - import {userRoomsByUrl} from "@app/state" + import {userRoomsByUrl, PLATFORM_RELAYS} from "@app/state" import {pushModal} from "@app/modal" const addSpace = () => pushModal(SpaceAdd) diff --git a/src/app/components/PrimaryNav.svelte b/src/app/components/PrimaryNav.svelte index 05f49d4..2fa7ee9 100644 --- a/src/app/components/PrimaryNav.svelte +++ b/src/app/components/PrimaryNav.svelte @@ -13,7 +13,7 @@ import MenuOtherSpaces from "@app/components/MenuOtherSpaces.svelte" import MenuSettings from "@app/components/MenuSettings.svelte" import PrimaryNavItemSpace from "@app/components/PrimaryNavItemSpace.svelte" - import {userRoomsByUrl, canDecrypt, PLATFORM_RELAY, PLATFORM_LOGO} from "@app/state" + import {userRoomsByUrl, canDecrypt, PLATFORM_RELAYS, PLATFORM_LOGO} from "@app/state" import {pushModal} from "@app/modal" import {makeSpacePath} from "@app/routes" import {notifications} from "@app/notifications" @@ -57,8 +57,8 @@ class="ml-sai mt-sai mb-sai relative z-nav hidden w-14 flex-shrink-0 bg-base-200 pt-4 md:block">
- {#if PLATFORM_RELAY} - + {#each PLATFORM_RELAYS as url (url)} + {:else} @@ -79,7 +79,7 @@ - {/if} + {/each}
- {#if !PLATFORM_RELAY} + {#if PLATFORM_RELAYS.length !== 1} pushModal(SpaceAdd) onMount(() => { - if (PLATFORM_RELAY) { - goto(makeSpacePath(PLATFORM_RELAY)) + if (PLATFORM_RELAYS.length > 0) { + goto(makeSpacePath(PLATFORM_RELAYS[0])) } }) -{#if !PLATFORM_RELAY} -
-
-
-

Welcome to

-

{PLATFORM_NAME}

-
- - - - {#snippet icon()} -
- {/snippet} - {#snippet title()} -
Browse the network
- {/snippet} - {#snippet info()} -
Find communities on the nostr network.
- {/snippet} -
- - - - {#snippet icon()} -
- {/snippet} - {#snippet title()} -
Start a conversation
- {/snippet} - {#snippet info()} -
Use nostr's encrypted group chats to stay in touch.
- {/snippet} -
- -
+
+
+
+

Welcome to

+

{PLATFORM_NAME}

+
+ + + + {#snippet icon()} +
+ {/snippet} + {#snippet title()} +
Browse the network
+ {/snippet} + {#snippet info()} +
Find communities on the nostr network.
+ {/snippet} +
+ + + + {#snippet icon()} +
+ {/snippet} + {#snippet title()} +
Start a conversation
+ {/snippet} + {#snippet info()} +
Use nostr's encrypted group chats to stay in touch.
+ {/snippet} +
+
-{/if} +
diff --git a/src/routes/spaces/[relay]/[room]/+page.svelte b/src/routes/spaces/[relay]/[room]/+page.svelte index 9eeafea..a046b7c 100644 --- a/src/routes/spaces/[relay]/[room]/+page.svelte +++ b/src/routes/spaces/[relay]/[room]/+page.svelte @@ -299,7 +299,25 @@ {/snippet} {#snippet action()}
- {#if $membershipStatus !== MembershipStatus.Initial} + {#if $membershipStatus === MembershipStatus.Initial} + + {:else if $membershipStatus === MembershipStatus.Pending} + + {:else}