Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
380f25bb
Commit
380f25bb
authored
Jun 19, 2023
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dataset document add pages tip
parent
8a521916
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
index.tsx
web/app/components/datasets/create/step-one/index.tsx
+6
-4
No files found.
web/app/components/datasets/create/step-one/index.tsx
View file @
380f25bb
...
@@ -15,7 +15,7 @@ import { NotionPageSelector } from '@/app/components/base/notion-page-selector'
...
@@ -15,7 +15,7 @@ import { NotionPageSelector } from '@/app/components/base/notion-page-selector'
type
IStepOneProps
=
{
type
IStepOneProps
=
{
datasetId
?:
string
datasetId
?:
string
dataSourceType
:
DataSourceType
dataSourceType
?
:
DataSourceType
dataSourceTypeDisable
:
Boolean
dataSourceTypeDisable
:
Boolean
hasConnection
:
boolean
hasConnection
:
boolean
onSetting
:
()
=>
void
onSetting
:
()
=>
void
...
@@ -77,17 +77,19 @@ const StepOne = ({
...
@@ -77,17 +77,19 @@ const StepOne = ({
setCurrentNotionPage
(
undefined
)
setCurrentNotionPage
(
undefined
)
}
}
const
shouldShowDataSourceTypeList
=
!
datasetId
||
(
datasetId
&&
!
dataSourceType
)
return
(
return
(
<
div
className=
'flex w-full h-full'
>
<
div
className=
'flex w-full h-full'
>
<
div
className=
'grow overflow-y-auto relative'
>
<
div
className=
'grow overflow-y-auto relative'
>
{
{
!
datasetId
&&
(
shouldShowDataSourceTypeList
&&
(
<
div
className=
{
s
.
stepHeader
}
>
{
t
(
'datasetCreation.steps.one'
)
}
</
div
>
<
div
className=
{
s
.
stepHeader
}
>
{
t
(
'datasetCreation.steps.one'
)
}
</
div
>
)
)
}
}
<
div
className=
{
s
.
form
}
>
<
div
className=
{
s
.
form
}
>
{
{
!
datasetId
&&
(
shouldShowDataSourceTypeList
&&
(
<
div
className=
{
s
.
dataSourceTypeList
}
>
<
div
className=
{
s
.
dataSourceTypeList
}
>
<
div
<
div
className=
{
cn
(
className=
{
cn
(
...
@@ -134,7 +136,7 @@ const StepOne = ({
...
@@ -134,7 +136,7 @@ const StepOne = ({
}
}
{
dataSourceType
===
DataSourceType
.
FILE
&&
(
{
dataSourceType
===
DataSourceType
.
FILE
&&
(
<>
<>
<
FileUploader
onFileUpdate=
{
updateFile
}
file=
{
file
}
titleClassName=
{
datasetId
&&
'mt-[30px] !mb-[44px] !text-lg !font-semibold !text-gray-900'
}
/>
<
FileUploader
onFileUpdate=
{
updateFile
}
file=
{
file
}
titleClassName=
{
(
!
shouldShowDataSourceTypeList
)
?
'mt-[30px] !mb-[44px] !text-lg !font-semibold !text-gray-900'
:
undefined
}
/>
<
Button
disabled=
{
!
file
}
className=
{
s
.
submitButton
}
type=
'primary'
onClick=
{
onStepChange
}
>
{
t
(
'datasetCreation.stepOne.button'
)
}
</
Button
>
<
Button
disabled=
{
!
file
}
className=
{
s
.
submitButton
}
type=
'primary'
onClick=
{
onStepChange
}
>
{
t
(
'datasetCreation.stepOne.button'
)
}
</
Button
>
</>
</>
)
}
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment