Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: a start page at / and the hive directory at /hives

/ is now the swarm's name over the digital-rain backdrop the hive
dashboard's home has, and the swarm name in the header links to it. The
hive directory moves to /hives, where the nav's hives tab points. The
swarm name is read once per page load by a shared hook, the header and
the start page both use it. Closes #5252
This commit is contained in:
iris 2026-10-14 14:49:44 +02:00 • committed by mara
commit 417125b33c
10 changed files with 240 additions and 37 deletions

View file

@ -1,4 +1,4 @@
// <HivesPage> — the hive roster, `/`'s content. Fetches
// <HivesPage> — the hive roster, `/hives`' content. Fetches
// swarm-controller's `GET /api/hives/status`, the swarm-wide status
// aggregate: one row per roster hive, freshness derived at read time
// from the status bucket. Supersedes the earlier `GET /api/hives` +

View file

@ -0,0 +1,23 @@
/* The page fills the full-bleed body; the rain canvas fills the page and the
* name sits centred over it. */
.start-page {
position: relative;
flex: 1;
min-height: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.start-page-name {
position: relative;
margin: 0;
padding: 0 1em;
text-align: center;
font-size: clamp(2em, 8vw, 5em);
font-weight: 600;
color: var(--purple);
text-shadow:
0 0 0.4em color-mix(in srgb, var(--purple) 55%, transparent),
0 0 1.2em var(--bg);
}

View file

@ -0,0 +1,20 @@
// <StartPage> — `/`, the swarm's landing page: the swarm's name over the
// digital-rain backdrop, and nothing else. The header's swarm name links
// here. The hive roster that used to be `/` is now `/hives`.
import { MatrixRain } from "../shell/MatrixRain.js";
import { useSwarmName } from "../shell/useSwarmName.js";
import "./StartPage.css";
// Same fallback as the header and the page title, so an unnamed swarm shows
// one label everywhere.
const DEFAULT_NAME = "hyperhive swarm";
export function StartPage() {
const name = useSwarmName() ?? DEFAULT_NAME;
return (
<div class="start-page">
<MatrixRain />
<h1 class="start-page-name">{name}</h1>
</div>
);
}