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.
17 lines
568 B
TypeScript
17 lines
568 B
TypeScript
// The "hide developer details" preference as a value that follows its toggle:
|
|
// this tab's, through `setHideDebugPref`, and another tab's, through the
|
|
// `storage` event. The header uses it to hide the components tab.
|
|
import { useEffect, useState } from "preact/hooks";
|
|
import {
|
|
getHideDebugPref,
|
|
subscribeHideDebugPref,
|
|
} from "@hive/shared/prefs.js";
|
|
|
|
export function useHideDebug(): boolean {
|
|
const [hide, setHide] = useState(getHideDebugPref);
|
|
useEffect(
|
|
() => subscribeHideDebugPref(() => setHide(getHideDebugPref())),
|
|
[],
|
|
);
|
|
return hide;
|
|
}
|