flotilla/src/app/components/SpaceCreate.svelte

59 lines
1.9 KiB
Svelte
Raw Normal View History

2024-08-08 21:02:46 +00:00
<script lang="ts">
2024-08-08 23:32:46 +00:00
import InputProfilePicture from '@lib/components/InputProfilePicture.svelte'
2024-08-08 21:02:46 +00:00
import Field from '@lib/components/Field.svelte'
import Icon from '@lib/components/Icon.svelte'
2024-08-08 23:32:46 +00:00
import InfoNip29 from '@app/components/InfoNip29.svelte'
2024-08-09 00:22:17 +00:00
import SpaceCreateFinish from '@app/components/SpaceCreateFinish.svelte'
2024-08-08 23:32:46 +00:00
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
const showNip29Info = () => pushModal(InfoNip29)
let file: File
let name = ""
let relay = ""
2024-08-08 21:02:46 +00:00
</script>
<div class="column gap-4">
<h1 class="heading">Customize your Space</h1>
<p class="text-center">
2024-08-08 23:32:46 +00:00
Give people a few details to go on. You can always change this later.
2024-08-08 21:02:46 +00:00
</p>
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>
<label class="input input-bordered w-full flex items-center gap-2" slot="input">
<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>
<label class="input input-bordered w-full flex items-center gap-2" slot="input">
<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.
<button class="text-primary underline cursor-pointer" on:click={showNip29Info}>
More information
</button>
</p>
2024-08-08 21:02:46 +00:00
</Field>
<div class="flex flex-row justify-between items-center gap-4">
<button class="btn btn-link" on:click={back}>
<Icon icon="alt-arrow-left" />
Go back
</button>
2024-08-08 23:32:46 +00:00
<button class="btn btn-primary" on:click={next}>
2024-08-08 21:02:46 +00:00
Next
<Icon icon="alt-arrow-right" class="!bg-base-300" />
</button>
</div>
</div>