rename auth name

This commit is contained in:
zxhlyh
2025-07-21 17:59:13 +08:00
parent 4d36e784b7
commit 386d320650
2 changed files with 3 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ const Item = ({
<Operator
credentialItem={credentialItem}
onAction={onAction}
onRename={() => setRenaming(true)}
/>
</div>
)

View File

@@ -37,6 +37,7 @@ export const usePluginAuthAction = (
doingActionRef.current = doing
setDoingAction(doing)
}, [])
const [editValues, setEditValues] = useState<Record<string, any> | 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<Record<string, any> | null>(null)
const handleEdit = useCallback((id: string, values: Record<string, any>) => {
pendingOperationCredentialId.current = id
setEditValues(values)