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"
|
2024-10-09 21:19:27 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
2026-09-08 22:47:51 +00:00
|
|
|
import Page from "@lib/components/Page.svelte"
|
|
|
|
|
import PageBar from "@lib/components/PageBar.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 23:30:23 +00:00
|
|
|
const today = new Date().toLocaleDateString(undefined, {
|
|
|
|
|
weekday: "long",
|
|
|
|
|
month: "short",
|
|
|
|
|
day: "numeric",
|
|
|
|
|
})
|
|
|
|
|
|
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>
|
|
|
|
|
<PageBar>
|
2026-09-08 23:30:23 +00:00
|
|
|
<div class="flex items-center justify-between gap-2">
|
|
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
|
<Icon icon={Home} size={6} />
|
|
|
|
|
<strong>Home</strong>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="hidden text-sm opacity-75 sm:inline">{today}</span>
|
2026-09-08 22:47:51 +00:00
|
|
|
</div>
|
|
|
|
|
</PageBar>
|
2026-09-09 01:14:19 +00:00
|
|
|
<PageContent noPad bind:element class="flex flex-col bg-surface">
|
2026-09-09 00:13:54 +00:00
|
|
|
<div class="flex min-w-0 flex-1 flex-col lg:flex-row lg:items-stretch">
|
2026-09-09 01:14:19 +00:00
|
|
|
<!-- The columns are `contents` below lg, which puts every section in one flow and lets the
|
|
|
|
|
rail's health checks sit between the inbox and the rest of the main column. -->
|
|
|
|
|
<div class="contents lg:flex lg:min-w-0 lg:flex-[2] lg:flex-col lg:border-r lg:border-line">
|
2026-09-08 23:30:23 +00:00
|
|
|
<HomeInbox />
|
2026-09-09 01:14:19 +00:00
|
|
|
<HomeActivity class="order-last" />
|
|
|
|
|
<HomeNetwork class="order-last border-b-0" />
|
2026-09-08 23:30:23 +00:00
|
|
|
</div>
|
2026-09-09 01:14:19 +00:00
|
|
|
<div class="contents lg:flex lg:w-96 lg:min-w-0 lg:shrink-0 lg:flex-col">
|
2026-09-08 23:30:23 +00:00
|
|
|
<HomeHealthChecks />
|
|
|
|
|
{#if HOSTING_ENABLED}
|
2026-09-09 01:14:19 +00:00
|
|
|
<HomeHosting class="border-b-0 max-lg:hidden" />
|
2026-09-08 23:30:23 +00:00
|
|
|
{/if}
|
|
|
|
|
</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>
|