Keep service route choices independent of daemon transport and persist the selected route per host. Use the shared web overlay stack so menus, tooltips, and toasts layer predictably. Track proxy route changes from the Git branch rather than the workspace title to avoid transient service health changes.
28 lines
672 B
TypeScript
28 lines
672 B
TypeScript
/**
|
|
* Shared overlay root for web portals (modals, toasts, etc.)
|
|
* This ensures consistent stacking order by controlling a single overlay container.
|
|
*
|
|
* Z-index scale within overlay root:
|
|
* - Modal backdrop/content: 10
|
|
* - Toast: 20
|
|
* - Tooltip: 30
|
|
*/
|
|
export function getOverlayRoot(): HTMLElement {
|
|
let el = document.getElementById("overlay-root");
|
|
if (!el) {
|
|
el = document.createElement("div");
|
|
el.id = "overlay-root";
|
|
el.style.position = "fixed";
|
|
el.style.inset = "0";
|
|
el.style.pointerEvents = "none";
|
|
document.body.appendChild(el);
|
|
}
|
|
return el;
|
|
}
|
|
|
|
export const OVERLAY_Z = {
|
|
modal: 10,
|
|
toast: 20,
|
|
tooltip: 30,
|
|
} as const;
|