Tweak landing page when there's an invite code
This commit is contained in:
parent
5bc499cf3a
commit
ef6069e7a4
3 changed files with 17 additions and 6 deletions
2
.env
2
.env
|
|
@ -12,7 +12,7 @@ VITE_PLATFORM_RELAYS=
|
||||||
VITE_PLATFORM_LOGEE=be523f2d2255fa96b281233ba9df60d63ef74f874bea96651edd4e1f79785703
|
VITE_PLATFORM_LOGEE=be523f2d2255fa96b281233ba9df60d63ef74f874bea96651edd4e1f79785703
|
||||||
VITE_PLATFORM_ACCENT="#7161FF"
|
VITE_PLATFORM_ACCENT="#7161FF"
|
||||||
VITE_THEME="clay"
|
VITE_THEME="clay"
|
||||||
VITE_PLATFORM_DESCRIPTION="The chat app built for self-hosted communities."
|
VITE_PLATFORM_DESCRIPTION="Digital communities for free people."
|
||||||
VITE_PUSH_SERVER=https://nps.flotilla.social/
|
VITE_PUSH_SERVER=https://nps.flotilla.social/
|
||||||
VITE_PUSH_BRIDGE=wss://npb.coracle.social/
|
VITE_PUSH_BRIDGE=wss://npb.coracle.social/
|
||||||
VITE_BLOCKED_RELAYS=brb.io,relay.nostr.band,nostr.mutinywallet.com,feeds.nostr.band,nostr.zbd.gg,wot.utxo.one,blastr.f7z.xyz,relay.current.fyi
|
VITE_BLOCKED_RELAYS=brb.io,relay.nostr.band,nostr.mutinywallet.com,feeds.nostr.band,nostr.zbd.gg,wot.utxo.one,blastr.f7z.xyz,relay.current.fyi
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import {page} from "$app/stores"
|
||||||
|
import {displayRelayUrl} from "@welshman/util"
|
||||||
import Login from "@assets/icons/login-3.svg?dataurl"
|
import Login from "@assets/icons/login-3.svg?dataurl"
|
||||||
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
|
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
|
||||||
import Icon from "@lib/components/Icon.svelte"
|
import Icon from "@lib/components/Icon.svelte"
|
||||||
|
|
@ -10,6 +12,7 @@
|
||||||
import CardButton from "@lib/components/CardButton.svelte"
|
import CardButton from "@lib/components/CardButton.svelte"
|
||||||
import LogIn from "@app/components/LogIn.svelte"
|
import LogIn from "@app/components/LogIn.svelte"
|
||||||
import SignUp from "@app/components/SignUp.svelte"
|
import SignUp from "@app/components/SignUp.svelte"
|
||||||
|
import {parseInviteLink} from "@app/access"
|
||||||
import {
|
import {
|
||||||
PLATFORM_ABOUT,
|
PLATFORM_ABOUT,
|
||||||
PLATFORM_TERMS,
|
PLATFORM_TERMS,
|
||||||
|
|
@ -19,6 +22,10 @@
|
||||||
} from "@app/env"
|
} from "@app/env"
|
||||||
import {pushModal} from "@app/modal"
|
import {pushModal} from "@app/modal"
|
||||||
|
|
||||||
|
const invite = $derived(
|
||||||
|
$page.url.pathname === "/join" ? parseInviteLink($page.url.href) : undefined,
|
||||||
|
)
|
||||||
|
|
||||||
const logIn = () => pushModal(LogIn)
|
const logIn = () => pushModal(LogIn)
|
||||||
|
|
||||||
const signUp = () => pushModal(SignUp)
|
const signUp = () => pushModal(SignUp)
|
||||||
|
|
@ -27,8 +34,13 @@
|
||||||
<Modal>
|
<Modal>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div class="py-2">
|
<div class="py-2">
|
||||||
<ModalTitle>Welcome to {PLATFORM_NAME}!</ModalTitle>
|
{#if invite}
|
||||||
<p class="text-center">{PLATFORM_DESCRIPTION}</p>
|
<ModalTitle>Welcome to</ModalTitle>
|
||||||
|
<p class="m-auto max-w-sm text-center text-primary">{displayRelayUrl(invite.url)}</p>
|
||||||
|
{:else}
|
||||||
|
<ModalTitle>Welcome to<br />{PLATFORM_NAME}!</ModalTitle>
|
||||||
|
<p class="m-auto max-w-sm text-center">{PLATFORM_DESCRIPTION}</p>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<Button aria-label="Log in" onclick={logIn}>
|
<Button aria-label="Log in" onclick={logIn}>
|
||||||
<CardButton primary>
|
<CardButton primary>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
import {attemptRelayAccess} from "@app/access"
|
import {attemptRelayAccess} from "@app/access"
|
||||||
import {
|
import {
|
||||||
POMADE_SIGNERS,
|
POMADE_SIGNERS,
|
||||||
PLATFORM_NAME,
|
|
||||||
INDEXER_RELAYS,
|
INDEXER_RELAYS,
|
||||||
DEFAULT_RELAYS,
|
DEFAULT_RELAYS,
|
||||||
DEFAULT_MESSAGING_RELAYS,
|
DEFAULT_MESSAGING_RELAYS,
|
||||||
|
|
@ -106,9 +105,9 @@
|
||||||
|
|
||||||
<Modal>
|
<Modal>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<ModalTitle>Join {PLATFORM_NAME}</ModalTitle>
|
<ModalTitle>Create an Account</ModalTitle>
|
||||||
<p class="m-auto max-w-sm text-center">
|
<p class="m-auto max-w-sm text-center">
|
||||||
Censorship resistant digital spaces for communities. Meet new people, own your identity.
|
Get started in just a few clicks by picking one of the options below.
|
||||||
</p>
|
</p>
|
||||||
{#if hasPomade}
|
{#if hasPomade}
|
||||||
<Button onclick={flows.email.start} class="button button-primary">
|
<Button onclick={flows.email.start} class="button button-primary">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue