diff --git a/web/app/components/app/configuration/dataset-config/card-item/item.tsx b/web/app/components/app/configuration/dataset-config/card-item/item.tsx index 65ad2ca941..4feba8b01e 100644 --- a/web/app/components/app/configuration/dataset-config/card-item/item.tsx +++ b/web/app/components/app/configuration/dataset-config/card-item/item.tsx @@ -12,6 +12,7 @@ import { DataSourceType } from '@/models/datasets' import FileIcon from '@/app/components/base/file-icon' import { Folder } from '@/app/components/base/icons/src/vender/solid/files' import { Globe06 } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel' +import ActionButton, { ActionButtonState } from '@/app/components/base/action-button' import Drawer from '@/app/components/base/drawer' import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' import Badge from '@/app/components/base/badge' @@ -47,56 +48,66 @@ const Item: FC = ({ const [isDeleting, setIsDeleting] = useState(false) return ( -
- { - config.data_source_type === DataSourceType.FILE && ( -
- -
- ) - } - { - config.data_source_type === DataSourceType.NOTION && ( -
- -
- ) - } - { - config.data_source_type === DataSourceType.WEB && ( -
- -
- ) - } -
-
-
{config.name}
- {config.provider === 'external' - ? - : } -
-
-
+
+
{ - editable &&
setShowSettingsModal(true)} - > - -
+ config.data_source_type === DataSourceType.FILE && ( +
+ +
+ ) } -
+ +
+ ) + } + { + config.data_source_type === DataSourceType.WEB && ( +
+ +
+ ) + } +
{config.name}
+
+
+ { + editable && { + e.stopPropagation() + setShowSettingsModal(true) + }} + > + + + } + onRemove(config.id)} - onMouseOver={() => setIsDeleting(true)} + state={isDeleting ? ActionButtonState.Destructive : ActionButtonState.Default} + onMouseEnter={() => setIsDeleting(true)} onMouseLeave={() => setIsDeleting(false)} > - -
+ +
+ { + config.indexing_technique && + } + { + config.provider === 'external' && + } setShowSettingsModal(false)} footer={null} mask={isMobile} panelClassName='mt-16 mx-2 sm:mr-2 mb-3 !p-0 !max-w-[640px] rounded-xl'> = ({ }, [onRemove]) return ( -