2024-08-05 21:45:16 +00:00
|
|
|
<script lang="ts">
|
2024-10-22 18:38:44 +00:00
|
|
|
import {onMount} from "svelte"
|
2026-09-08 22:47:51 +00:00
|
|
|
import Home from "@assets/icons/home.svg?dataurl"
|
2026-09-23 03:13:48 +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"
|
2026-09-17 18:26:01 +00:00
|
|
|
import Link from "@lib/components/Link.svelte"
|
2026-09-08 22:47:51 +00:00
|
|
|
import Page from "@lib/components/Page.svelte"
|
2026-06-24 20:56:53 +00:00
|
|
|
import PageContent from "@lib/components/PageContent.svelte"
|
2026-09-09 01:14:19 +00:00
|
|
|
import ScrollToTop from "@lib/components/ScrollToTop.svelte"
|
2026-09-08 22:47:51 +00:00
|
|
|
import HomeInbox from "@app/components/HomeInbox.svelte"
|
2026-09-08 23:47:49 +00:00
|
|
|
import HomeActivity from "@app/components/HomeActivity.svelte"
|
2026-09-08 22:47:51 +00:00
|
|
|
import HomeNetwork from "@app/components/HomeNetwork.svelte"
|
|
|
|
|
import HomeHealthChecks from "@app/components/HomeHealthChecks.svelte"
|
|
|
|
|
import HomeHosting from "@app/components/HomeHosting.svelte"
|
2026-06-08 21:14:40 +00:00
|
|
|
import {goToSpace} from "@app/routes"
|
2026-09-08 22:47:51 +00:00
|
|
|
import {HOSTING_ENABLED} from "@app/hosting"
|
|
|
|
|
import {PLATFORM_RELAYS} from "@app/env"
|
2026-02-18 19:02:39 +00:00
|
|
|
|
2026-09-09 01:14:19 +00:00
|
|
|
let element: Element | undefined = $state()
|
|
|
|
|
|
2026-09-08 22:47:51 +00:00
|
|
|
// A single-space build has no dashboard to show - everything on it is scoped to the one space.
|
|
|
|
|
onMount(() => {
|
2026-02-18 19:02:39 +00:00
|
|
|
if (PLATFORM_RELAYS.length > 0) {
|
2026-09-02 23:42:29 +00:00
|
|
|
goToSpace(PLATFORM_RELAYS[0], {replaceState: true})
|
2024-10-22 18:10:49 +00:00
|
|
|
}
|
|
|
|
|
})
|
2024-08-05 21:45:16 +00:00
|
|
|
</script>
|
|
|
|
|
|
2026-09-08 22:47:51 +00:00
|
|
|
<Page>
|
2026-09-26 08:12:13 +00:00
|
|
|
<PageContent bind:element class="@container p-0 md:p-4">
|
2026-09-22 18:22:45 +00:00
|
|
|
<div class="mx-auto flex w-full max-w-[1200px] min-w-0 flex-col gap-3">
|
|
|
|
|
<div class="flex items-center justify-between gap-4 px-4 py-3 md:px-2 md:pt-0">
|
|
|
|
|
<h1 class="flex items-center gap-2 text-xl font-bold">
|
|
|
|
|
<Icon icon={Home} size={6} />
|
|
|
|
|
Home
|
|
|
|
|
</h1>
|
|
|
|
|
<Link href="/spaces" class="button button-neutral button-sm">
|
2026-09-23 03:13:48 +00:00
|
|
|
<Icon icon={Compass} size={4} />
|
2026-09-22 18:22:45 +00:00
|
|
|
Browse spaces
|
|
|
|
|
</Link>
|
2026-09-17 18:26:01 +00:00
|
|
|
</div>
|
2026-09-26 08:12:13 +00:00
|
|
|
<div class="flex min-w-0 flex-col gap-3 @2xl:flex-row @2xl:items-start">
|
|
|
|
|
<!-- Both columns are `contents` on a narrow page, which puts every section in one flow and lets
|
2026-09-22 18:22:45 +00:00
|
|
|
the rail sit between the day's activity and the feed that would otherwise bury it. -->
|
2026-09-26 08:12:13 +00:00
|
|
|
<div class="contents @2xl:flex @2xl:min-w-0 @2xl:flex-1 @2xl:flex-col @2xl:gap-3">
|
2026-09-22 18:22:45 +00:00
|
|
|
<HomeInbox />
|
|
|
|
|
<HomeActivity />
|
2026-09-26 08:12:13 +00:00
|
|
|
<HomeNetwork class="order-last @2xl:order-none" />
|
2026-09-22 18:22:45 +00:00
|
|
|
</div>
|
2026-09-26 08:12:13 +00:00
|
|
|
<div class="contents @2xl:flex @2xl:w-80 @2xl:shrink-0 @2xl:flex-col @2xl:gap-3">
|
2026-09-22 18:22:45 +00:00
|
|
|
<HomeHealthChecks />
|
|
|
|
|
{#if HOSTING_ENABLED}
|
2026-09-26 08:12:13 +00:00
|
|
|
<HomeHosting class="@max-2xl:hidden" />
|
2026-09-22 18:22:45 +00:00
|
|
|
{/if}
|
|
|
|
|
</div>
|
2026-09-08 23:30:23 +00:00
|
|
|
</div>
|
2026-09-08 22:47:51 +00:00
|
|
|
</div>
|
|
|
|
|
</PageContent>
|
2026-09-09 01:14:19 +00:00
|
|
|
<ScrollToTop {element} />
|
2026-09-08 22:47:51 +00:00
|
|
|
</Page>
|