From b9ae6c9b206a23c42abefcfa24fcae0446afcdf8 Mon Sep 17 00:00:00 2001 From: jZonG Date: Fri, 18 Apr 2025 16:34:58 +0800 Subject: [PATCH] right header --- .../workflow/variable-inspect/panel.tsx | 9 +-- .../workflow/variable-inspect/right.tsx | 69 +++++++++++++++++++ 2 files changed, 74 insertions(+), 4 deletions(-) create mode 100644 web/app/components/workflow/variable-inspect/right.tsx diff --git a/web/app/components/workflow/variable-inspect/panel.tsx b/web/app/components/workflow/variable-inspect/panel.tsx index 791b512303..ab4e0c6a59 100644 --- a/web/app/components/workflow/variable-inspect/panel.tsx +++ b/web/app/components/workflow/variable-inspect/panel.tsx @@ -5,6 +5,7 @@ import { } from '@remixicon/react' import { useStore } from '../store' import Empty from './empty' +import Right from './right' import ActionButton from '@/app/components/base/action-button' import cn from '@/utils/classnames' @@ -33,13 +34,13 @@ const Panel: FC = () => { return (
{/* left */} - {showLeftPanel &&
setShowLeftPanel(false)}>
} + {bottomPanelWidth < 488 && showLeftPanel &&
setShowLeftPanel(false)}>
}
{ left
{/* right */} -
- right +
+ setShowLeftPanel(true)} />
) diff --git a/web/app/components/workflow/variable-inspect/right.tsx b/web/app/components/workflow/variable-inspect/right.tsx new file mode 100644 index 0000000000..2ed3dd88a7 --- /dev/null +++ b/web/app/components/workflow/variable-inspect/right.tsx @@ -0,0 +1,69 @@ +// import { useState } from 'react' +import { + RiArrowGoBackLine, + RiCloseLine, + RiMenuLine, +} from '@remixicon/react' +import { useStore } from '../store' +import { BlockEnum } from '../types' +import Empty from './empty' +import ActionButton from '@/app/components/base/action-button' +import Badge from '@/app/components/base/badge' +import CopyFeedback from '@/app/components/base/copy-feedback' +import Tooltip from '@/app/components/base/tooltip' +import BlockIcon from '@/app/components/workflow/block-icon' +import cn from '@/utils/classnames' + +type Props = { + handleOpenMenu: () => void +} + +const Right = ({ handleOpenMenu }: Props) => { + const bottomPanelWidth = useStore(s => s.bottomPanelWidth) + const setShowVariableInspectPanel = useStore(s => s.setShowVariableInspectPanel) + + return ( +
+ {/* header */} +
+ {bottomPanelWidth < 488 && ( + + + + )} +
+ +
LLM
+
/
+
out_put
+
String
+
+
+ + + Edited + + + setShowVariableInspectPanel(false)}> + + + + + setShowVariableInspectPanel(false)}> + + +
+
+ {/* content */} +
+ +
+
+ ) +} + +export default Right