From 386d320650c979926458fa4467fe8c7d34d050c6 Mon Sep 17 00:00:00 2001 From: zxhlyh Date: Mon, 21 Jul 2025 17:59:13 +0800 Subject: [PATCH] rename auth name --- .../header/account-setting/data-source-page-new/item.tsx | 1 + .../plugins/plugin-auth/hooks/use-plugin-auth-action.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/header/account-setting/data-source-page-new/item.tsx b/web/app/components/header/account-setting/data-source-page-new/item.tsx index b70945d8f4..76206a4037 100644 --- a/web/app/components/header/account-setting/data-source-page-new/item.tsx +++ b/web/app/components/header/account-setting/data-source-page-new/item.tsx @@ -86,6 +86,7 @@ const Item = ({ setRenaming(true)} /> ) diff --git a/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts b/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts index f07b918c66..d199606fe5 100644 --- a/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts +++ b/web/app/components/plugins/plugin-auth/hooks/use-plugin-auth-action.ts @@ -37,6 +37,7 @@ export const usePluginAuthAction = ( doingActionRef.current = doing setDoingAction(doing) }, []) + const [editValues, setEditValues] = useState | null>(null) const handleConfirm = useCallback(async () => { if (doingActionRef.current) return @@ -54,12 +55,12 @@ export const usePluginAuthAction = ( onUpdate?.() setDeleteCredentialId(null) pendingOperationCredentialId.current = null + setEditValues(null) } finally { handleSetDoingAction(false) } }, [deletePluginCredential, onUpdate, notify, t, handleSetDoingAction]) - const [editValues, setEditValues] = useState | null>(null) const handleEdit = useCallback((id: string, values: Record) => { pendingOperationCredentialId.current = id setEditValues(values)