From 52e7bb1848c27ff7cf2859598f18b175eb76480b Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Wed, 16 Jul 2025 15:03:33 +0800 Subject: [PATCH] fix --- web/app/components/plugins/plugin-auth/authorized/index.tsx | 2 ++ web/app/components/plugins/plugin-auth/authorized/item.tsx | 2 +- .../nodes/_base/components/workflow-panel/index.tsx | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/app/components/plugins/plugin-auth/authorized/index.tsx b/web/app/components/plugins/plugin-auth/authorized/index.tsx index 57da2148fe..ac771afdd3 100644 --- a/web/app/components/plugins/plugin-auth/authorized/index.tsx +++ b/web/app/components/plugins/plugin-auth/authorized/index.tsx @@ -303,6 +303,7 @@ const Authorized = ({ canOAuth={canOAuth} canApiKey={canApiKey} disabled={disabled} + onUpdate={onUpdate} /> @@ -330,6 +331,7 @@ const Authorized = ({ }} onRemove={handleRemove} disabled={disabled || doingAction} + onUpdate={onUpdate} /> ) } diff --git a/web/app/components/plugins/plugin-auth/authorized/item.tsx b/web/app/components/plugins/plugin-auth/authorized/item.tsx index 4c0f88d985..642240d7fe 100644 --- a/web/app/components/plugins/plugin-auth/authorized/item.tsx +++ b/web/app/components/plugins/plugin-auth/authorized/item.tsx @@ -68,7 +68,7 @@ const Item = ({ 'group flex h-8 items-center rounded-lg p-1 hover:bg-state-base-hover', renaming && 'bg-state-base-hover', )} - onClick={() => onItemClick?.(credential.id)} + onClick={() => onItemClick?.(credential.id === '__workspace_default__' ? '' : credential.id)} > { renaming && ( diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx b/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx index 987c013c82..d50b99e213 100644 --- a/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx +++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx @@ -235,13 +235,13 @@ const BasePanel: FC = ({ return data.type === BlockEnum.Tool && currCollection?.allow_delete }, [currCollection, data.type]) const handleAuthorizationItemClick = useCallback((credential_id: string) => { - handleNodeDataUpdate({ + handleNodeDataUpdateWithSyncDraft({ id, data: { - credential_id: credential_id === '__workspace_default__' ? undefined : credential_id, + credential_id, }, }) - }, [handleNodeDataUpdate, id]) + }, [handleNodeDataUpdateWithSyncDraft, id]) if(logParams.showSpecialResultPanel) { return (