Browse Source
Header's folder icon now opens the workflow browser modal instead of the OS directory picker directly. The modal wraps WorkflowBrowserView in the standard overlay pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>handoff-20260429-1057
2 changed files with 49 additions and 31 deletions
@ -0,0 +1,36 @@ |
|||||
|
"use client"; |
||||
|
|
||||
|
import { WorkflowFile } from "@/store/workflowStore"; |
||||
|
import { WorkflowBrowserView } from "./quickstart/WorkflowBrowserView"; |
||||
|
|
||||
|
interface WorkflowBrowserModalProps { |
||||
|
isOpen: boolean; |
||||
|
onClose: () => void; |
||||
|
onWorkflowLoaded: (workflow: WorkflowFile, directoryPath: string) => void; |
||||
|
} |
||||
|
|
||||
|
export function WorkflowBrowserModal({ |
||||
|
isOpen, |
||||
|
onClose, |
||||
|
onWorkflowLoaded, |
||||
|
}: WorkflowBrowserModalProps) { |
||||
|
if (!isOpen) return null; |
||||
|
|
||||
|
return ( |
||||
|
<div |
||||
|
className="fixed inset-0 z-[100] flex items-center justify-center bg-black/60" |
||||
|
onWheelCapture={(e) => e.stopPropagation()} |
||||
|
onClick={onClose} |
||||
|
> |
||||
|
<div |
||||
|
className="w-full max-w-2xl mx-4 bg-neutral-800 rounded-xl border border-neutral-700 shadow-2xl overflow-clip max-h-[85vh] flex flex-col" |
||||
|
onClick={(e) => e.stopPropagation()} |
||||
|
> |
||||
|
<WorkflowBrowserView |
||||
|
onWorkflowLoaded={onWorkflowLoaded} |
||||
|
onClose={onClose} |
||||
|
/> |
||||
|
</div> |
||||
|
</div> |
||||
|
); |
||||
|
} |
||||
Loading…
Reference in new issue