mirror of
https://github.com/langgenius/dify.git
synced 2026-02-20 01:44:42 +08:00
Merge branch 'feat/hitl-frontend' of https://github.com/langgenius/dify into feat/hitl-frontend
This commit is contained in:
commit
6e9facd9b5
@ -20,7 +20,7 @@ const ExecutedAction = ({
|
||||
i18nKey="nodes.humanInput.userActions.triggered"
|
||||
ns="workflow"
|
||||
components={{ strong: <span className="system-xs-medium text-text-secondary"></span> }}
|
||||
values={{ actionName: executedAction.title }}
|
||||
values={{ actionName: executedAction.id }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -19,7 +19,7 @@ type Props = {
|
||||
value: RecipientItem[]
|
||||
list: Member[]
|
||||
onDelete: (recipient: RecipientItem) => void
|
||||
onSelect: (value: any) => void
|
||||
onSelect: (value: string) => void
|
||||
onAdd: (email: string) => void
|
||||
disabled?: boolean
|
||||
}
|
||||
@ -69,7 +69,7 @@ const EmailInput = ({
|
||||
setOpen(true)
|
||||
}
|
||||
|
||||
const handleSelect = (value: any) => {
|
||||
const handleSelect = (value: string) => {
|
||||
setSearchKey('')
|
||||
setOpen(false)
|
||||
onSelect(value)
|
||||
@ -89,10 +89,13 @@ const EmailInput = ({
|
||||
return
|
||||
if (value.some(item => item.email === emailAddress))
|
||||
return
|
||||
if (list.some(item => item.email === emailAddress))
|
||||
onSelect(emailAddress)
|
||||
else
|
||||
if (list.some(item => item.email === emailAddress)) {
|
||||
const item = list.find(item => item.email === emailAddress)!
|
||||
onSelect(item.id)
|
||||
}
|
||||
else {
|
||||
onAdd(emailAddress)
|
||||
}
|
||||
setSearchKey('')
|
||||
setOpen(false)
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ const EmailSenderModal = ({
|
||||
return varInputs
|
||||
}, [availableNodes, config?.body, formContent, nodesOutputVars])
|
||||
|
||||
const [inputs, setInputs] = useState<Record<string, any>>({})
|
||||
const [inputs, setInputs] = useState<Record<string, unknown>>({})
|
||||
const [collapsed, setCollapsed] = useState(true)
|
||||
const [sendingEmail, setSendingEmail] = useState(false)
|
||||
const [done, setDone] = useState(false)
|
||||
@ -193,7 +193,7 @@ const EmailSenderModal = ({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{(onlySpecificUsers || combinedRecipients) && (
|
||||
{(onlySpecificUsers || combinedRecipients) && !debugEnabled && (
|
||||
<div className="px-5">
|
||||
<EmailInput
|
||||
disabled
|
||||
@ -267,7 +267,7 @@ const EmailSenderModal = ({
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{(onlySpecificUsers || combinedRecipients) && (
|
||||
{(onlySpecificUsers || combinedRecipients) && !debugEnabled && (
|
||||
<>
|
||||
<div className="px-5">
|
||||
<EmailInput
|
||||
|
||||
@ -184,7 +184,7 @@ const Panel: FC<NodePanelProps<HumanInputNodeType>> = ({
|
||||
<div className="space-y-2">
|
||||
{inputs.user_actions.map((action, index) => (
|
||||
<UserActionItem
|
||||
key={index}
|
||||
key={action.id}
|
||||
data={action}
|
||||
onChange={data => handleUserActionChange(index, data)}
|
||||
onDelete={handleUserActionDelete}
|
||||
|
||||
@ -3392,11 +3392,6 @@
|
||||
"count": 5
|
||||
}
|
||||
},
|
||||
"app/components/workflow/nodes/human-input/components/delivery-method/recipient/email-input.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"app/components/workflow/nodes/human-input/components/delivery-method/recipient/member-list.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 2
|
||||
@ -3409,7 +3404,7 @@
|
||||
},
|
||||
"app/components/workflow/nodes/human-input/components/delivery-method/test-email-sender.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 3
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"app/components/workflow/nodes/human-input/components/form-content-preview.tsx": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user