diff --git a/web/app/components/datasets/create/file-uploader/index.module.css b/web/app/components/datasets/create/file-uploader/index.module.css
index bf5b7dcaf5..93a7c0e535 100644
--- a/web/app/components/datasets/create/file-uploader/index.module.css
+++ b/web/app/components/datasets/create/file-uploader/index.module.css
@@ -7,14 +7,12 @@
font-weight: 500;
font-size: 16px;
line-height: 24px;
- color: #344054;
}
.fileUploader .tip {
font-weight: 400;
font-size: 12px;
line-height: 18px;
- color: #667085;
}
.uploader {
@@ -22,18 +20,10 @@
flex-direction: column;
max-width: 640px;
min-height: 80px;
- background: #F9FAFB;
- border: 1px dashed #EAECF0;
border-radius: 12px;
font-weight: 400;
font-size: 14px;
line-height: 20px;
- color: #667085;
-}
-
-.uploader.dragging {
- background: #F5F8FF;
- border: 1px dashed #B2CCFF;
}
.uploader .draggingCover {
@@ -193,4 +183,4 @@
.file:hover .actionWrapper .remove {
display: block;
-}
\ No newline at end of file
+}
diff --git a/web/app/components/datasets/create/file-uploader/index.tsx b/web/app/components/datasets/create/file-uploader/index.tsx
index adb4bed0d1..0afa5b38f0 100644
--- a/web/app/components/datasets/create/file-uploader/index.tsx
+++ b/web/app/components/datasets/create/file-uploader/index.tsx
@@ -3,6 +3,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import useSWR from 'swr'
+import classNames from 'classnames'
import s from './index.module.css'
import cn from '@/utils/classnames'
import type { CustomFile as File, FileItem } from '@/models/datasets'
@@ -249,18 +250,18 @@ const FileUploader = ({
/>
)}
-
{t('datasetCreation.stepOne.uploader.title')}
+ {t('datasetCreation.stepOne.uploader.title')}
{!hideUpload && (
-
+
-
-
+
+
{t('datasetCreation.stepOne.uploader.button')}
-
{t('datasetCreation.stepOne.uploader.tip', {
+
{t('datasetCreation.stepOne.uploader.tip', {
size: fileUploadConfig.file_size_limit,
supportTypes: supportTypesShowNames,
})}
diff --git a/web/app/components/datasets/create/index.tsx b/web/app/components/datasets/create/index.tsx
index f2f869b704..8d9c4d9da3 100644
--- a/web/app/components/datasets/create/index.tsx
+++ b/web/app/components/datasets/create/index.tsx
@@ -123,7 +123,7 @@ const DatasetUpdateForm = ({ datasetId }: DatasetUpdateFormProps) => {
return (
-
+
{
shouldShowDataSourceTypeList && (
- {t('datasetCreation.steps.one')}
+ {t('datasetCreation.steps.one')}
)
}
-
+
{
shouldShowDataSourceTypeList && (
diff --git a/web/app/components/datasets/create/step-two/index.tsx b/web/app/components/datasets/create/step-two/index.tsx
index 5a3d8536dc..60513f9b9b 100644
--- a/web/app/components/datasets/create/step-two/index.tsx
+++ b/web/app/components/datasets/create/step-two/index.tsx
@@ -992,19 +992,21 @@ const StepTwo = ({
title='Preview'
>
-
>}
- onChange={(selected) => {
- currentEstimateMutation.reset()
- setPreviewFile(selected)
- currentEstimateMutation.mutate()
- }}
- value={previewFile!}
- />
-
+ {files.length && <>
+ >}
+ onChange={(selected) => {
+ currentEstimateMutation.reset()
+ setPreviewFile(selected)
+ currentEstimateMutation.mutate()
+ }}
+ value={previewFile!}
+ />
+
+ >}
}
className={cn(s.previewWrap, isMobile && s.isMobile, 'relative h-full overflow-y-scroll')}
diff --git a/web/app/components/datasets/create/top-bar/index.tsx b/web/app/components/datasets/create/top-bar/index.tsx
index 526ae870ad..74be673efd 100644
--- a/web/app/components/datasets/create/top-bar/index.tsx
+++ b/web/app/components/datasets/create/top-bar/index.tsx
@@ -18,9 +18,9 @@ const STEP_T_MAP: Record
= {
export const Topbar: FC = (props) => {
const { className, ...rest } = props
const { t } = useTranslation()
- return
+ return
-
+
{t('datasetCreation.steps.header.creation')}