3314f8405b
- Run and pipeline rows use one coloured status glyph with the word in its tooltip; the run version sits at the right of the title line; the usage metrics row is gone. - Settings is an icon beside the connection status (rail and dock), not a destination tab; the destinations keep a roving tab even while Settings is open. - The rail and every list pane collapse to a narrow strip from an icon at their top-right (remembered per device). A collapsed runs list shows the status glyph, pipelines their flow glyph, chats their status word. - Tool calls open in a modal (rendered/expanded rows in place) instead of an inline popover; the chip stays a quiet line beside the message. - Refresh tooltips show the last data arrival (manual or socket) per destination.
31 lines
902 B
JavaScript
31 lines
902 B
JavaScript
// The shell's two layout preferences: a collapsed destination rail and a
|
|
// collapsed list pane. Per-device, so they survive reloads.
|
|
|
|
export const LAYOUT_KEY = "pipelines.web.layout.v1";
|
|
|
|
export function readLayoutPrefs(storage = globalThis.localStorage) {
|
|
try {
|
|
const parsed = JSON.parse(storage?.getItem(LAYOUT_KEY) ?? "{}");
|
|
return {
|
|
railCollapsed: parsed?.railCollapsed === true,
|
|
listCollapsed: parsed?.listCollapsed === true,
|
|
};
|
|
} catch {
|
|
return { railCollapsed: false, listCollapsed: false };
|
|
}
|
|
}
|
|
|
|
export function writeLayoutPrefs(prefs, storage = globalThis.localStorage) {
|
|
try {
|
|
storage?.setItem(
|
|
LAYOUT_KEY,
|
|
JSON.stringify({
|
|
railCollapsed: prefs?.railCollapsed === true,
|
|
listCollapsed: prefs?.listCollapsed === true,
|
|
}),
|
|
);
|
|
} catch {
|
|
// Storage may be unavailable; the in-memory choice still applies.
|
|
}
|
|
}
|