diff --git a/web/app/components/workflow/operator/index.tsx b/web/app/components/workflow/operator/index.tsx index 63d048bcea..07508214d8 100644 --- a/web/app/components/workflow/operator/index.tsx +++ b/web/app/components/workflow/operator/index.tsx @@ -15,6 +15,7 @@ const Operator = ({ handleUndo, handleRedo }: OperatorProps) => { const bottomPanelRef = useRef(null) const workflowCanvasWidth = useStore(s => s.workflowCanvasWidth) const rightPanelWidth = useStore(s => s.rightPanelWidth) + const setBottomPanelWidth = useStore(s => s.setBottomPanelWidth) const setBottomPanelHeight = useStore(s => s.setBottomPanelHeight) const bottomPanelWidth = useMemo(() => { @@ -28,7 +29,8 @@ const Operator = ({ handleUndo, handleRedo }: OperatorProps) => { if (bottomPanelRef.current) { const resizeContainerObserver = new ResizeObserver((entries) => { for (const entry of entries) { - const { blockSize } = entry.borderBoxSize[0] + const { inlineSize, blockSize } = entry.borderBoxSize[0] + setBottomPanelWidth(inlineSize) setBottomPanelHeight(blockSize) } }) diff --git a/web/app/components/workflow/variable-inspect/panel.tsx b/web/app/components/workflow/variable-inspect/panel.tsx index 2a79ef5c8f..791b512303 100644 --- a/web/app/components/workflow/variable-inspect/panel.tsx +++ b/web/app/components/workflow/variable-inspect/panel.tsx @@ -1,4 +1,5 @@ import type { FC } from 'react' +import { useState } from 'react' import { RiCloseLine, } from '@remixicon/react' @@ -8,10 +9,11 @@ import ActionButton from '@/app/components/base/action-button' import cn from '@/utils/classnames' const Panel: FC = () => { + const bottomPanelWidth = useStore(s => s.bottomPanelWidth) const setShowVariableInspectPanel = useStore(s => s.setShowVariableInspectPanel) + const [showLeftPanel, setShowLeftPanel] = useState(true) - const isEmpty = true - + const isEmpty = false if (isEmpty) { return (
@@ -29,7 +31,25 @@ const Panel: FC = () => { } return ( -
+
+ {/* left */} + {showLeftPanel &&
setShowLeftPanel(false)}>
} +
+ left +
+ {/* right */} +
+ right +
) }