chore: add a secondary confirmation dialog when the user delete the tool (#5634)

This commit is contained in:
非法操作 2024-06-26 19:27:22 +08:00 • committed by GitHub
commit 89a7c70730
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 60 additions and 4 deletions

View file

@ -244,7 +244,7 @@ const WorkflowToolAsModal: FC<Props> = ({
</div>
<div className={cn((!isAdd && onRemove) ? 'justify-between' : 'justify-end', 'mt-2 shrink-0 flex py-4 px-6 rounded-b-[10px] bg-gray-50 border-t border-black/5')} >
{!isAdd && onRemove && (
<Button onClick={onRemove}>{t('common.operation.remove')}</Button>
<Button onClick={onRemove} className='text-red-500 border-red-50 hover:border-red-500'>{t('common.operation.delete')}</Button>
)}
<div className='flex space-x-2 '>
<Button onClick={onHide}>{t('common.operation.cancel')}</Button>