Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 230 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@radix-ui/react-toggle": "^1.1.10",
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@xyflow/react": "^12.10.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.544.0",
Expand Down
45 changes: 43 additions & 2 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { useState, useEffect, useRef } from "react";
import { Settings, Cloud, CloudOff, Plug } from "lucide-react";
import {
Settings,
Cloud,
CloudOff,
Plug,
Workflow,
Monitor,
} from "lucide-react";
import { Button } from "./ui/button";
import { SettingsDialog } from "./SettingsDialog";
import { PluginsDialog } from "./PluginsDialog";
Expand All @@ -13,6 +20,9 @@ interface HeaderProps {
// External settings tab control
openSettingsTab?: string | null;
onSettingsTabOpened?: () => void;
// Graph mode toggle
graphMode?: boolean;
onGraphModeToggle?: () => void;
}

export function Header({
Expand All @@ -21,6 +31,8 @@ export function Header({
cloudDisabled,
openSettingsTab,
onSettingsTabOpened,
graphMode = false,
onGraphModeToggle,
}: HeaderProps) {
const [settingsOpen, setSettingsOpen] = useState(false);
const [pluginsOpen, setPluginsOpen] = useState(false);
Expand Down Expand Up @@ -119,7 +131,36 @@ export function Header({
return (
<header className={`w-full bg-background px-6 py-4 ${className}`}>
<div className="flex items-center justify-between">
<h1 className="text-xl font-medium text-foreground">Daydream Scope</h1>
<div className="flex items-center gap-3">
<h1 className="text-xl font-medium text-foreground">
Daydream Scope
</h1>
{onGraphModeToggle && (
<Button
variant="ghost"
size="sm"
onClick={onGraphModeToggle}
className="text-xs text-muted-foreground hover:text-foreground transition-colors gap-1.5"
title={
graphMode
? "Switch to Perform Mode"
: "Switch to Workflow Builder"
}
>
{graphMode ? (
<>
<Monitor className="h-4 w-4" />
Perform Mode
</>
) : (
<>
<Workflow className="h-4 w-4" />
Workflow Builder
</>
)}
</Button>
)}
</div>
<div className="flex items-center gap-1">
<Button
variant="ghost"
Expand Down
Loading