mirror of
https://github.com/coracle-social/flotilla.git
synced 2025-12-10 10:57:04 +00:00
39 lines
1.1 KiB
Svelte
39 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import {page} from "$app/stores"
|
|
import {pubkey} from "@welshman/app"
|
|
import Landing from "@app/components/Landing.svelte"
|
|
import Toast from "@app/components/Toast.svelte"
|
|
import PrimaryNav from "@app/components/PrimaryNav.svelte"
|
|
import EmailConfirm from "@app/components/EmailConfirm.svelte"
|
|
import PasswordReset from "@app/components/PasswordReset.svelte"
|
|
import {BURROW_URL} from "@app/state"
|
|
import {modals, pushModal} from "@app/modal"
|
|
|
|
if (BURROW_URL && !$pubkey) {
|
|
if ($page.url.pathname === "/confirm-email") {
|
|
pushModal(EmailConfirm, {
|
|
email: $page.url.searchParams.get("email"),
|
|
confirm_token: $page.url.searchParams.get("confirm_token"),
|
|
})
|
|
}
|
|
|
|
if ($page.url.pathname === "/reset-password") {
|
|
pushModal(PasswordReset, {
|
|
email: $page.url.searchParams.get("email"),
|
|
reset_token: $page.url.searchParams.get("reset_token"),
|
|
})
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<div class="flex h-screen overflow-hidden">
|
|
{#if $pubkey}
|
|
<PrimaryNav>
|
|
<slot />
|
|
</PrimaryNav>
|
|
{:else if !$modals[$page.url.hash.slice(1)]}
|
|
<Landing />
|
|
{/if}
|
|
</div>
|
|
<Toast />
|