From f04daf056d1a7b05908915f4c100b6607ca95a26 Mon Sep 17 00:00:00 2001 From: JzoNg Date: Fri, 1 Aug 2025 14:37:48 +0800 Subject: [PATCH] delivery methods --- .../components/delivery-method/index.tsx | 36 +++++++++++++++++++ .../workflow/nodes/human-input/panel.tsx | 8 +++++ web/i18n/en-US/workflow.ts | 2 ++ web/i18n/zh-Hans/workflow.ts | 2 ++ 4 files changed, 48 insertions(+) create mode 100644 web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx diff --git a/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx b/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx new file mode 100644 index 0000000000..1b413b44f1 --- /dev/null +++ b/web/app/components/workflow/nodes/human-input/components/delivery-method/index.tsx @@ -0,0 +1,36 @@ +import React from 'react' +import { useTranslation } from 'react-i18next' +import { + RiAddLine, +} from '@remixicon/react' +import Tooltip from '@/app/components/base/tooltip' +import ActionButton from '@/app/components/base/action-button' + +const i18nPrefix = 'workflow.nodes.humanInput' + +const DeliveryMethod: React.FC = () => { + const { t } = useTranslation() + + return ( +
+
+
+
{t(`${i18nPrefix}.deliveryMethod.title`)}
+ +
+
+ { /* Add new user action logic here */ }} + > + + +
+
+
{t(`${i18nPrefix}.deliveryMethod.emptyTip`)}
+
+ ) +} + +export default DeliveryMethod diff --git a/web/app/components/workflow/nodes/human-input/panel.tsx b/web/app/components/workflow/nodes/human-input/panel.tsx index e0f8a287d3..6829a40e99 100644 --- a/web/app/components/workflow/nodes/human-input/panel.tsx +++ b/web/app/components/workflow/nodes/human-input/panel.tsx @@ -11,6 +11,7 @@ import type { NodePanelProps } from '@/app/components/workflow/types' import ActionButton from '@/app/components/base/action-button' import Tooltip from '@/app/components/base/tooltip' import Divider from '@/app/components/base/divider' +import DeliveryMethod from './components/delivery-method' import UserActionItem from './components/user-action' import TimeoutInput from './components/timeout' import { v4 as uuid4 } from 'uuid' @@ -31,6 +32,12 @@ const Panel: FC> = ({ } = useConfig(id, data) return (
+ {/* delivery methods */} + +
+ +
+ {/* user actions */}
@@ -73,6 +80,7 @@ const Panel: FC> = ({
+ {/* timeout */}
{t(`${i18nPrefix}.timeout.title`)}