flotilla/src/app/components/SpaceCreate.svelte

56 lines
1.9 KiB
Svelte
Raw Normal View History

2024-08-08 21:02:46 +00:00
<script lang="ts">
2024-08-16 17:50:38 +00:00
import InputProfilePicture from "@lib/components/InputProfilePicture.svelte"
2024-08-09 23:22:09 +00:00
import Button from "@lib/components/Button.svelte"
2024-08-16 17:50:38 +00:00
import Field from "@lib/components/Field.svelte"
import Icon from "@lib/components/Icon.svelte"
import InfoNip29 from "@app/components/InfoNip29.svelte"
import SpaceCreateFinish from "@app/components/SpaceCreateFinish.svelte"
import {pushModal} from "@app/modal"
2024-08-08 21:02:46 +00:00
const back = () => history.back()
2024-08-08 23:32:46 +00:00
2024-08-09 00:22:17 +00:00
const next = () => pushModal(SpaceCreateFinish)
2024-08-08 23:32:46 +00:00
let file: File
let name = ""
let relay = ""
2024-08-08 21:02:46 +00:00
</script>
2024-08-09 23:22:09 +00:00
<form class="column gap-4" on:submit|preventDefault={next}>
<div class="py-2">
<h1 class="heading">Customize your Space</h1>
2024-08-16 17:50:38 +00:00
<p class="text-center">Give people a few details to go on. You can always change this later.</p>
2024-08-09 23:22:09 +00:00
</div>
2024-08-08 23:32:46 +00:00
<div class="flex justify-center py-2">
<InputProfilePicture bind:file />
</div>
<Field>
<p slot="label">Space Name</p>
2024-08-16 17:50:38 +00:00
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
2024-08-08 23:32:46 +00:00
<Icon icon="fire-minimalistic" />
<input bind:value={name} class="grow" type="text" />
</label>
</Field>
2024-08-08 21:02:46 +00:00
<Field>
2024-08-08 23:32:46 +00:00
<p slot="label">Relay</p>
2024-08-16 17:50:38 +00:00
<label class="input input-bordered flex w-full items-center gap-2" slot="input">
2024-08-08 23:32:46 +00:00
<Icon icon="remote-controller-minimalistic" />
<input bind:value={relay} class="grow" type="text" />
</label>
<p slot="info">
This should be a NIP-29 compatible nostr relay where you'd like to host your space.
2024-08-16 22:17:30 +00:00
<Button class="link" on:click={() => pushModal(InfoNip29)}>What is a relay?</Button>
2024-08-08 23:32:46 +00:00
</p>
2024-08-08 21:02:46 +00:00
</Field>
2024-08-16 17:50:38 +00:00
<div class="flex flex-row items-center justify-between gap-4">
2024-08-09 23:22:09 +00:00
<Button class="btn btn-link" on:click={back}>
2024-08-08 21:02:46 +00:00
<Icon icon="alt-arrow-left" />
Go back
2024-08-09 23:22:09 +00:00
</Button>
<Button type="submit" class="btn btn-primary">
2024-08-08 21:02:46 +00:00
Next
<Icon icon="alt-arrow-right" class="!bg-base-300" />
2024-08-09 23:22:09 +00:00
</Button>
2024-08-08 21:02:46 +00:00
</div>
2024-08-09 23:22:09 +00:00
</form>