diff --git a/src/app/commands.ts b/src/app/commands.ts index dc63d342..f2e267a5 100644 --- a/src/app/commands.ts +++ b/src/app/commands.ts @@ -214,20 +214,22 @@ export const checkRelayProfile = async (url: string) => { export const checkRelayConnection = async (url: string) => { const connection = ctx.net.pool.get(url) + const okStatuses = [ConnectionStatus.Ok, ConnectionStatus.Slow, ConnectionStatus.Unauthorized] await connection.ensureConnected() - if (![ConnectionStatus.Ok, ConnectionStatus.Slow].includes(connection.meta.getStatus())) { + if (!okStatuses.includes(connection.meta.getStatus())) { return `Failed to connect: "${connection.meta.getDescription()}"` } } export const checkRelayAuth = async (url: string) => { const connection = ctx.net.pool.get(url) + const okStatuses = [AuthStatus.Ok, AuthStatus.Pending] await connection.ensureAuth() - if (![AuthStatus.Ok, AuthStatus.Pending].includes(connection.meta.authStatus)) { + if (!okStatuses.includes(connection.meta.authStatus)) { return `Failed to authenticate: "${connection.meta.authStatus}"` } } diff --git a/src/app/components/MenuSpaces.svelte b/src/app/components/MenuSpaces.svelte index 96701707..2c079c05 100644 --- a/src/app/components/MenuSpaces.svelte +++ b/src/app/components/MenuSpaces.svelte @@ -9,7 +9,7 @@ import SpaceAvatar from "@app/components/SpaceAvatar.svelte" import RelayName from "@app/components/RelayName.svelte" import RelayDescription from "@app/components/RelayDescription.svelte" - import SpaceCreateExternal from "@app/components/SpaceCreateExternal.svelte" + import SpaceAdd from "@app/components/SpaceAdd.svelte" import SpaceExit from "@app/components/SpaceExit.svelte" import SpaceJoin from "@app/components/SpaceJoin.svelte" import RoomCreate from "@app/components/RoomCreate.svelte" @@ -43,7 +43,7 @@ showSettings = false } - const createSpace = () => pushModal(SpaceCreateExternal) + const addSpace = () => pushModal(SpaceAdd) const browseSpaces = () => goto("/discover") @@ -125,10 +125,10 @@ {#if getMembershipUrls($userMembership).length > 0} {/if} - + - Create a space + Add a space Invite all your friends, do life together. diff --git a/src/app/components/SpaceAdd.svelte b/src/app/components/SpaceAdd.svelte index 08078ce4..558981c9 100644 --- a/src/app/components/SpaceAdd.svelte +++ b/src/app/components/SpaceAdd.svelte @@ -19,13 +19,6 @@ Spaces are places where communities come together to work, play, and hang out. - - - - Create a space - Just a few questions and you'll be on your way. - - @@ -33,4 +26,11 @@ Enter an invite code or url to join an existing space. + + + + Create a space + Just a few questions and you'll be on your way. + + diff --git a/src/app/components/SpaceCheck.svelte b/src/app/components/SpaceCheck.svelte index 08692f9d..3eab9777 100644 --- a/src/app/components/SpaceCheck.svelte +++ b/src/app/components/SpaceCheck.svelte @@ -1,21 +1,35 @@ + + + + {title} + {subtitle} + + {message} + + + + Go back + + + Confirm + + + +
{message}