feat/tool-oauth
zxhlyh 9 months ago
parent 686b4b8e0e
commit 52e7bb1848

@ -303,6 +303,7 @@ const Authorized = ({
canOAuth={canOAuth} canOAuth={canOAuth}
canApiKey={canApiKey} canApiKey={canApiKey}
disabled={disabled} disabled={disabled}
onUpdate={onUpdate}
/> />
</div> </div>
</div> </div>
@ -330,6 +331,7 @@ const Authorized = ({
}} }}
onRemove={handleRemove} onRemove={handleRemove}
disabled={disabled || doingAction} disabled={disabled || doingAction}
onUpdate={onUpdate}
/> />
) )
} }

@ -68,7 +68,7 @@ const Item = ({
'group flex h-8 items-center rounded-lg p-1 hover:bg-state-base-hover', 'group flex h-8 items-center rounded-lg p-1 hover:bg-state-base-hover',
renaming && 'bg-state-base-hover', renaming && 'bg-state-base-hover',
)} )}
onClick={() => onItemClick?.(credential.id)} onClick={() => onItemClick?.(credential.id === '__workspace_default__' ? '' : credential.id)}
> >
{ {
renaming && ( renaming && (

@ -235,13 +235,13 @@ const BasePanel: FC<BasePanelProps> = ({
return data.type === BlockEnum.Tool && currCollection?.allow_delete return data.type === BlockEnum.Tool && currCollection?.allow_delete
}, [currCollection, data.type]) }, [currCollection, data.type])
const handleAuthorizationItemClick = useCallback((credential_id: string) => { const handleAuthorizationItemClick = useCallback((credential_id: string) => {
handleNodeDataUpdate({ handleNodeDataUpdateWithSyncDraft({
id, id,
data: { data: {
credential_id: credential_id === '__workspace_default__' ? undefined : credential_id, credential_id,
}, },
}) })
}, [handleNodeDataUpdate, id]) }, [handleNodeDataUpdateWithSyncDraft, id])
if(logParams.showSpecialResultPanel) { if(logParams.showSpecialResultPanel) {
return ( return (

Loading…
Cancel
Save