flotilla/src/app/components/SpaceAdd.svelte

68 lines
2.1 KiB
Svelte
Raw Normal View History

2024-08-08 21:02:46 +00:00
<script lang="ts">
2025-09-10 22:26:39 +00:00
import Compass from "@assets/icons/compass-big.svg?dataurl"
2025-09-12 16:11:53 +00:00
import Login from "@assets/icons/login-3.svg?dataurl"
2025-09-10 22:26:39 +00:00
import AddCircle from "@assets/icons/add-circle.svg?dataurl"
2024-10-09 21:19:27 +00:00
import Icon from "@lib/components/Icon.svelte"
2024-10-15 19:02:11 +00:00
import Link from "@lib/components/Link.svelte"
2024-10-09 21:19:27 +00:00
import Button from "@lib/components/Button.svelte"
2024-08-16 17:50:38 +00:00
import CardButton from "@lib/components/CardButton.svelte"
2024-10-09 23:11:23 +00:00
import ModalHeader from "@lib/components/ModalHeader.svelte"
2024-09-11 18:33:50 +00:00
import SpaceCreateExternal from "@app/components/SpaceCreateExternal.svelte"
2024-08-16 19:42:00 +00:00
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
import {pushModal} from "@app/util/modal"
2024-08-08 21:02:46 +00:00
2024-09-11 18:33:50 +00:00
const startCreate = () => pushModal(SpaceCreateExternal)
2024-08-09 00:22:17 +00:00
2024-08-16 19:42:00 +00:00
const startJoin = () => pushModal(SpaceInviteAccept)
2024-08-08 21:02:46 +00:00
</script>
<div class="column gap-4">
2024-10-09 23:11:23 +00:00
<ModalHeader>
2025-02-04 00:37:14 +00:00
{#snippet title()}
<div>Add a Space</div>
{/snippet}
{#snippet info()}
<div>Spaces are places where communities come together to work, play, and hang out.</div>
{/snippet}
2024-10-09 23:11:23 +00:00
</ModalHeader>
2024-10-25 00:25:28 +00:00
<Link href="/discover">
2025-09-11 21:47:06 +00:00
<CardButton class="btn-primary">
2025-02-04 00:37:14 +00:00
{#snippet icon()}
2025-09-10 22:26:39 +00:00
<div><Icon icon={Compass} size={7} /></div>
2025-02-04 00:37:14 +00:00
{/snippet}
{#snippet title()}
<div>Discover spaces</div>
{/snippet}
{#snippet info()}
<div>Browse spaces on the discover page.</div>
{/snippet}
2024-10-25 00:25:28 +00:00
</CardButton>
</Link>
<Button onclick={startJoin}>
2025-09-11 21:47:06 +00:00
<CardButton class="dark:btn-neutral">
2025-02-04 00:37:14 +00:00
{#snippet icon()}
2025-09-10 22:26:39 +00:00
<div><Icon icon={Login} size={7} /></div>
2025-02-04 00:37:14 +00:00
{/snippet}
{#snippet title()}
<div>Join a space</div>
{/snippet}
{#snippet info()}
<div>Enter an invite code or url to join an existing space.</div>
{/snippet}
2024-10-09 21:19:27 +00:00
</CardButton>
</Button>
<Button onclick={startCreate}>
2025-09-11 21:47:06 +00:00
<CardButton class="dark:btn-neutral">
2025-02-04 00:37:14 +00:00
{#snippet icon()}
2025-09-10 22:26:39 +00:00
<div><Icon icon={AddCircle} size={7} /></div>
2025-02-04 00:37:14 +00:00
{/snippet}
{#snippet title()}
<div>Create a space</div>
{/snippet}
{#snippet info()}
<div>Just a few questions and you'll be on your way.</div>
{/snippet}
2024-10-11 00:49:42 +00:00
</CardButton>
</Button>
2024-08-08 21:02:46 +00:00
</div>