Refer to relay.tools for relay setup

This commit is contained in:
Jon Staab
2024-09-11 11:33:50 -07:00
parent 0ae02f2537
commit e9cbfec76d
6 changed files with 114 additions and 8 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
<script lang="ts">
import Button from "@lib/components/Button.svelte"
import CardButton from "@lib/components/CardButton.svelte"
import SpaceCreate from "@app/components/SpaceCreate.svelte"
import SpaceCreateExternal from "@app/components/SpaceCreateExternal.svelte"
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
import {pushModal} from "@app/modal"
const startCreate = () => pushModal(SpaceCreate)
const startCreate = () => pushModal(SpaceCreateExternal)
const startJoin = () => pushModal(SpaceInviteAccept)
</script>
@@ -0,0 +1,46 @@
<script lang="ts">
import Button from "@lib/components/Button.svelte"
import Field from "@lib/components/Field.svelte"
import Link from "@lib/components/Link.svelte"
import Icon from "@lib/components/Icon.svelte"
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
import {pushModal} from "@app/modal"
const back = () => history.back()
const next = () => {
window.open("https://relay.tools/signup")
pushModal(SpaceInviteAccept)
}
let file: File
let name = ""
let relay = ""
</script>
<form class="column gap-4" on:submit|preventDefault={next}>
<div class="py-2">
<h1 class="heading">Create a Space</h1>
<p class="text-center">
Host your own space, for your community.
</p>
</div>
<p>
<Link class="text-primary" external href="https://relay.tools">relay.tools</Link> is a third-party service
that allows anyone to run their own relay for use with Flotilla, or any other
nostr-compatible app.
</p>
<p>
Once you've created a relay of your own, come back here to link Flotilla with your new relay.
</p>
<div class="flex flex-row items-center justify-between gap-4">
<Button class="btn btn-link" on:click={back}>
<Icon icon="alt-arrow-left" />
Go back
</Button>
<Button type="submit" class="btn btn-primary">
Let's go
<Icon icon="alt-arrow-right" class="!bg-base-300" />
</Button>
</div>
</form>
+8 -2
View File
@@ -8,7 +8,9 @@
import Button from "@lib/components/Button.svelte"
import Field from "@lib/components/Field.svelte"
import Icon from "@lib/components/Icon.svelte"
import InfoRelay from "@app/components/InfoRelay.svelte"
import {pushToast} from "@app/toast"
import {pushModal} from "@app/modal"
import {addSpaceMembership} from "@app/commands"
import {makeSpacePath} from "@app/routes"
@@ -55,14 +57,18 @@
<form class="column gap-4" on:submit|preventDefault={join}>
<div class="py-2">
<h1 class="heading">Join a Space</h1>
<p class="text-center">Enter an invite link below to join an existing space.</p>
<p class="text-center">Enter an invite code below to join an existing space.</p>
</div>
<Field>
<p slot="label">Invite Link*</p>
<p slot="label">Invite code*</p>
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
<Icon icon="link-round" />
<input bind:value={url} class="grow" type="text" />
</label>
<p slot="info">
You can also directly join any relay by entering its URL here.
<Button class="link" on:click={() => pushModal(InfoRelay)}>What is a relay?</Button>
</p>
</Field>
<CardButton icon="compass" title="Don't have an invite?" on:click={browse}>
Browse other spaces on the discover page.