2024-08-08 21:02:46 +00:00
|
|
|
<script lang="ts">
|
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"
|
2025-10-28 23:46:49 +00:00
|
|
|
import Compass from "@assets/icons/compass.svg?dataurl"
|
2024-10-09 21:19:27 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
2025-10-28 23:46:49 +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"
|
2025-10-29 18:18:27 +00:00
|
|
|
import SpaceCreate from "@app/components/SpaceCreate.svelte"
|
2024-08-16 19:42:00 +00:00
|
|
|
import SpaceInviteAccept from "@app/components/SpaceInviteAccept.svelte"
|
2025-08-21 22:01:31 +00:00
|
|
|
import {pushModal} from "@app/util/modal"
|
2024-08-08 21:02:46 +00:00
|
|
|
|
2025-10-28 23:46:49 +00:00
|
|
|
type Props = {
|
|
|
|
|
hideDiscover?: boolean
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {hideDiscover}: Props = $props()
|
|
|
|
|
|
2025-10-29 18:18:27 +00:00
|
|
|
const startCreate = () => pushModal(SpaceCreate)
|
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>
|
|
|
|
|
|
2025-10-28 23:46:49 +00:00
|
|
|
<div class="column gap-2">
|
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>
|
2025-10-28 23:46:49 +00:00
|
|
|
{#if !hideDiscover}
|
|
|
|
|
<Link href="/discover">
|
|
|
|
|
<CardButton class="btn-primary">
|
|
|
|
|
{#snippet icon()}
|
|
|
|
|
<div><Icon icon={Compass} size={7} /></div>
|
|
|
|
|
{/snippet}
|
|
|
|
|
{#snippet title()}
|
|
|
|
|
<div>Explore Spaces</div>
|
|
|
|
|
{/snippet}
|
|
|
|
|
{#snippet info()}
|
|
|
|
|
<div>Join create, or browse spaces</div>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</CardButton>
|
|
|
|
|
</Link>
|
|
|
|
|
{/if}
|
2025-02-04 01:21:46 +00:00
|
|
|
<Button onclick={startJoin}>
|
2025-10-28 23:46:49 +00:00
|
|
|
<CardButton class={hideDiscover ? "btn-primary" : "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()}
|
2025-10-02 19:43:19 +00:00
|
|
|
<div>Enter an invite link to join an existing space.</div>
|
2025-02-04 00:37:14 +00:00
|
|
|
{/snippet}
|
2024-10-09 21:19:27 +00:00
|
|
|
</CardButton>
|
|
|
|
|
</Button>
|
2025-02-04 01:21:46 +00:00
|
|
|
<Button onclick={startCreate}>
|
2025-09-25 17:52:32 +00:00
|
|
|
<CardButton class="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>
|