MVP Debugger UI (#2888)

This commit is contained in:
Jonathan Dobson
2025-07-07 22:30:33 -04:00
committed by GitHub
parent d63053835f
commit acbdb15265
65 changed files with 2071 additions and 1022 deletions

View File

@@ -1,10 +1,15 @@
import { DiscordLogoIcon } from "@radix-ui/react-icons";
import GitHubButton from "react-github-btn";
import { Link, useMatch } from "react-router-dom";
import { Link, useMatch, useSearchParams } from "react-router-dom";
import { NavigationHamburgerMenu } from "./NavigationHamburgerMenu";
function Header() {
const match = useMatch("/workflows/:workflowPermanentId/edit");
const [searchParams] = useSearchParams();
const embed = searchParams.get("embed");
const match =
useMatch("/workflows/:workflowPermanentId/edit") ||
location.pathname.includes("debug") ||
embed === "true";
if (match) {
return null;

View File

@@ -4,18 +4,24 @@ import { cn } from "@/util/utils";
import { Outlet } from "react-router-dom";
import { Header } from "./Header";
import { Sidebar } from "./Sidebar";
import { useDebugStore } from "@/store/useDebugStore";
function RootLayout() {
const collapsed = useSidebarStore((state) => state.collapsed);
const embed = new URLSearchParams(window.location.search).get("embed");
const isEmbedded = embed === "true";
const debugStore = useDebugStore();
return (
<>
{!isEmbedded && <Sidebar />}
<div className="h-full w-full">
<Sidebar />
<Header />
<main
className={cn("lg:pb-4 lg:pl-64", {
"lg:pl-28": collapsed,
"lg:pl-4": isEmbedded,
"lg:pb-0": debugStore.isDebugMode,
})}
>
<Outlet />