interinstance styling changes yay

This commit is contained in:
legop3
2026-07-06 19:10:26 -04:00
parent 69b49ae1d6
commit a8bff428c2
7 changed files with 50 additions and 54 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -78,8 +78,8 @@
<script defer src="https://analytics.otter.land/script.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land"></script>
<script defer src="https://analytics.otter.land/recorder.js" data-website-id="82dd56a5-db44-4279-bd1e-a4d9fee39af7" data-domains="rover.otter.land" data-sample-rate="0.15" data-mask-level="moderate" data-max-duration="300000"></script>
<title>Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-BFWCxjyl.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CI7XPkxh.css">
<script type="module" crossorigin src="/assets/index-CAXEdE-L.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Brq9029h.css">
</head>
<body>
<div id="root"></div>
@@ -1,7 +1,7 @@
// Reward Definition: Light Strobe
// Purpose: Defines the light-strobe deterrence reward and activation contract. Scope: Encapsulates reward identity, labels, and effect parameters for runtime dispatch.
const STROBE_MS = 30 * 1000;
const TICK_MS = 500;
const STROBE_MS = 60 * 1000;
const TICK_MS = 1500;
let activeTimer = null;
@@ -44,7 +44,7 @@ module.exports = {
goal: 400,
async run(ctx) {
startStrobe(ctx, { endsAt: Date.now() + STROBE_MS, on: false });
ctx.sendAlert({ color: '#ffc107', title: 'Light Strobe', message: 'All room controls strobing for 30 seconds.' });
ctx.sendAlert({ color: '#ffc107', title: 'Light Strobe', message: 'All room controls strobing for 60 seconds.' });
},
async recover(ctx, effect) {
if (!effect || Number(effect.endsAt || 0) <= Date.now()) {
@@ -69,7 +69,8 @@ function InstancePanel({ remote, children = null }) {
const instance = remote?.instance || {};
const features = featureEntries(instance.features);
const color = instance.color || '#64748b';
const availability = getRemoteAvailability(remote);
const online = Boolean(remote?.online);
const publicUrl = instance.publicUrl || remote?.url || '';
return (
<CardFrame
title={instance.name || remote.url || 'External server'}
@@ -77,46 +78,41 @@ function InstancePanel({ remote, children = null }) {
>
<div className="h-1 w-full" style={{ backgroundColor: color }} title={color} />
<div className="space-y-0.5">
<div className="flex items-start justify-between gap-0.5">
<div className="min-w-0 flex-1 space-y-0.5">
{instance.description ? <p className="text-slate-200">{instance.description}</p> : null}
</div>
<div className="space-y-1 text-center">
{/*
The status is the main operational signal for a remote instance, so it
is placed in the body as a primary row instead of competing with the
card title. Offline cards stop after this small header/action area so
the user only sees one offline message and one way to visit the server.
*/}
<div className="flex justify-center">
<InstanceStatus remote={remote} />
</div>
<div className="min-w-0 space-y-0.5">
<div className="flex flex-wrap items-center gap-0.5">
{instance.publicUrl ? <span className="truncate text-slate-400">{instance.publicUrl}</span> : null}
<button type="button" className="button-dark" onClick={() => openExternalRoverWithPrompt(remote, '')}>
Visit server
</button>
{online && instance.description ? <p className="text-slate-200">{instance.description}</p> : null}
<div className="flex min-w-0 flex-col items-center justify-center gap-0.5 sm:flex-row sm:gap-2">
{publicUrl ? (
<span className="max-w-full truncate text-slate-400" title={publicUrl}>
{publicUrl}
</span>
) : null}
<button type="button" className="button-dark" onClick={() => openExternalRoverWithPrompt(remote, '')}>
Visit server
</button>
</div>
{online && features.length ? (
<div className="flex flex-wrap justify-center gap-0.5">
{features.map((feature) => (
<span key={feature} className="rounded bg-slate-800 px-1 text-[0.7rem] text-slate-200">
{feature}
</span>
))}
</div>
{features.length ? (
<div className="flex flex-wrap gap-0.5">
{features.map((feature) => (
<span key={feature} className="rounded bg-slate-800 px-1 text-[0.7rem] text-slate-200">
{feature}
</span>
))}
</div>
) : (
<p className="text-[0.75rem] text-slate-500">No advertised feature flags.</p>
)}
</div>
) : null}
</div>
{remote.online ? children : (
/*
Offline servers still belong in the same instance card so the large
inter-instance UI has one visual unit per directory entry. Keeping the
failure details here also avoids presenting a separate rover panel for
a server that cannot currently provide one.
*/
<div className="surface-muted space-y-0.5 text-sm">
<p className="font-semibold text-slate-200">{availability.overlay}</p>
<p className="break-all text-slate-400">{remote?.url || 'No URL available.'}</p>
{remote?.lastError ? <p className="text-red-300">{remote.lastError}</p> : null}
</div>
)}
{online ? children : null}
</CardFrame>
);
}