Work on add space modal

This commit is contained in:
Jon Staab
2024-08-08 14:02:46 -07:00
parent fb04a68168
commit 6c2e5d6e07
17 changed files with 232 additions and 107 deletions
+5 -1
View File
@@ -8,8 +8,12 @@
<script lang="ts">
import Icon from "@lib/components/Icon.svelte"
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
import SpaceAdd from '@app/components/SpaceAdd.svelte'
import {getGroupName, getGroupPicture, makeGroupId} from "@app/domain"
import {userGroupRelaysByNom, groupsById} from "@app/state"
import {pushModal} from "@app/modal"
export const addSpace = () => pushModal(SpaceAdd)
</script>
<div class="relative w-14 bg-base-100">
@@ -32,7 +36,7 @@
</div>
</PrimaryNavItem>
{/each}
<PrimaryNavItem title="Add Space">
<PrimaryNavItem title="Add Space" on:click={addSpace}>
<div class="!flex w-10 items-center justify-center">
<Icon size={7} icon="add-circle" />
</div>
+21
View File
@@ -0,0 +1,21 @@
<script lang="ts">
import CardButton from '@lib/components/CardButton.svelte'
import SpaceCreate from '@app/components/SpaceCreate.svelte'
import {pushModal} from '@app/modal'
const startCreate = () => pushModal(SpaceCreate)
</script>
<div class="column gap-4">
<h1 class="heading">Add a Space</h1>
<p class="text-center">Spaces are places where communities come together to work, play, and hang out.</p>
<CardButton icon="add-circle" title="Get started" on:click={startCreate}>
Just a few questions and you'll be on your way.
</CardButton>
<div class="card column gap-4">
<h2 class="subheading">Have an invite?</h2>
<button class="btn btn-primary">
Join a Space
</button>
</div>
</div>
+27
View File
@@ -0,0 +1,27 @@
<script lang="ts">
import Field from '@lib/components/Field.svelte'
import Icon from '@lib/components/Icon.svelte'
const back = () => history.back()
</script>
<div class="column gap-4">
<h1 class="heading">Customize your Space</h1>
<p class="text-center">
Give people a few details to go. You can always change this later.
</p>
<Field>
<p slot="label">Give your space a name:</p>
<input slot="input" type="text" class="input input-bordered w-full max-w-xs" />
</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>
<button class="btn btn-primary" on:click={back}>
Next
<Icon icon="alt-arrow-right" class="!bg-base-300" />
</button>
</div>
</div>