|
|
|
@ -37,6 +37,7 @@ export const usePluginAuthAction = (
|
|
|
|
doingActionRef.current = doing
|
|
|
|
doingActionRef.current = doing
|
|
|
|
setDoingAction(doing)
|
|
|
|
setDoingAction(doing)
|
|
|
|
}, [])
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
const [editValues, setEditValues] = useState<Record<string, any> | null>(null)
|
|
|
|
const handleConfirm = useCallback(async () => {
|
|
|
|
const handleConfirm = useCallback(async () => {
|
|
|
|
if (doingActionRef.current)
|
|
|
|
if (doingActionRef.current)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
@ -54,12 +55,12 @@ export const usePluginAuthAction = (
|
|
|
|
onUpdate?.()
|
|
|
|
onUpdate?.()
|
|
|
|
setDeleteCredentialId(null)
|
|
|
|
setDeleteCredentialId(null)
|
|
|
|
pendingOperationCredentialId.current = null
|
|
|
|
pendingOperationCredentialId.current = null
|
|
|
|
|
|
|
|
setEditValues(null)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
finally {
|
|
|
|
finally {
|
|
|
|
handleSetDoingAction(false)
|
|
|
|
handleSetDoingAction(false)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, [deletePluginCredential, onUpdate, notify, t, handleSetDoingAction])
|
|
|
|
}, [deletePluginCredential, onUpdate, notify, t, handleSetDoingAction])
|
|
|
|
const [editValues, setEditValues] = useState<Record<string, any> | null>(null)
|
|
|
|
|
|
|
|
const handleEdit = useCallback((id: string, values: Record<string, any>) => {
|
|
|
|
const handleEdit = useCallback((id: string, values: Record<string, any>) => {
|
|
|
|
pendingOperationCredentialId.current = id
|
|
|
|
pendingOperationCredentialId.current = id
|
|
|
|
setEditValues(values)
|
|
|
|
setEditValues(values)
|
|
|
|
|