Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/shared/src/settings/HideDebugSetting.tsx
iris 70917b7dd0 swarm-ui: hives are a folded card on the agents page, and hide developer details also hides the components tab
The hives nav tab and route go, with no redirect; the roster is a card above
the agents panel that starts folded and is read on the first open. The
settings toggle is renamed from hide debug output to hide developer details,
as it now also drops the components tab (the page still answers at
/components); the stored preference keeps its key.
2026-10-26 17:56:10 +01:00

26 lines
1,012 B
TypeScript

// Settings-menu row: "hide developer details". Rendered as a `<SettingsMenu>`
// child (`./SettingsMenu.js`) by each page that has a terminal, the
// per-agent page and the swarm UI, rather than as a prop on the menu: the
// caller owns its row. Both read the same preference (`../prefs.js`), which
// `../terminal/Row.tsx` follows as it changes — mara: "add a setting to not
// display verbose output... like the grey colored debug stuff."
import { useState } from "preact/hooks";
import { getHideDebugPref, setHideDebugPref } from "../prefs.js";
export function HideDebugSetting() {
const [hideDebug, setHideDebugState] = useState(() => getHideDebugPref());
return (
<label class="settings-menu-row">
<span>hide developer details</span>
<input
type="checkbox"
checked={hideDebug}
onChange={(e) => {
const v = (e.target as HTMLInputElement).checked;
setHideDebugPref(v);
setHideDebugState(v);
}}
/>
</label>
);
}