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
1610f599
Commit
1610f599
authored
Jul 28, 2023
by
JzoNg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: hide Q&A switch in economical type
parent
3f9d7f1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
index.tsx
web/app/components/datasets/create/step-two/index.tsx
+9
-2
No files found.
web/app/components/datasets/create/step-two/index.tsx
View file @
1610f599
...
@@ -346,6 +346,13 @@ const StepTwo = ({
...
@@ -346,6 +346,13 @@ const StepTwo = ({
setDocForm
(
DocForm
.
TEXT
)
setDocForm
(
DocForm
.
TEXT
)
}
}
const
changeToEconomicalType
=
()
=>
{
if
(
!
hasSetIndexType
)
{
setIndexType
(
IndexingType
.
ECONOMICAL
)
setDocForm
(
DocForm
.
TEXT
)
}
}
const
previewSwitch
=
async
()
=>
{
const
previewSwitch
=
async
()
=>
{
setPreviewSwitched
(
true
)
setPreviewSwitched
(
true
)
if
(
segmentationType
===
SegmentType
.
AUTO
)
if
(
segmentationType
===
SegmentType
.
AUTO
)
...
@@ -545,7 +552,7 @@ const StepTwo = ({
...
@@ -545,7 +552,7 @@ const StepTwo = ({
hasSetIndexType
&&
s
.
disabled
,
hasSetIndexType
&&
s
.
disabled
,
hasSetIndexType
&&
'!w-full'
,
hasSetIndexType
&&
'!w-full'
,
)
}
)
}
onClick=
{
()
=>
!
hasSetIndexType
&&
setIndexType
(
IndexingType
.
ECONOMICAL
)
}
onClick=
{
changeToEconomicalType
}
>
>
<
span
className=
{
cn
(
s
.
typeIcon
,
s
.
economical
)
}
/>
<
span
className=
{
cn
(
s
.
typeIcon
,
s
.
economical
)
}
/>
{
!
hasSetIndexType
&&
<
span
className=
{
cn
(
s
.
radio
)
}
/>
}
{
!
hasSetIndexType
&&
<
span
className=
{
cn
(
s
.
radio
)
}
/>
}
...
@@ -564,7 +571,7 @@ const StepTwo = ({
...
@@ -564,7 +571,7 @@ const StepTwo = ({
<
Link
className=
'text-[#155EEF]'
href=
{
`/datasets/${datasetId}/settings`
}
>
{
t
(
'datasetCreation.stepTwo.datasetSettingLink'
)
}
</
Link
>
<
Link
className=
'text-[#155EEF]'
href=
{
`/datasets/${datasetId}/settings`
}
>
{
t
(
'datasetCreation.stepTwo.datasetSettingLink'
)
}
</
Link
>
</
div
>
</
div
>
)
}
)
}
{
(
!
hasSetIndexType
||
(
hasSetIndexType
&&
indexingType
===
IndexingType
.
QUALIFIED
))
&&
(
{
indexType
===
IndexingType
.
QUALIFIED
&&
(
<
div
className=
'flex justify-between items-center mt-3 px-5 py-4 rounded-xl bg-gray-50 border border-gray-100'
>
<
div
className=
'flex justify-between items-center mt-3 px-5 py-4 rounded-xl bg-gray-50 border border-gray-100'
>
<
div
className=
'flex justify-center items-center w-8 h-8 rounded-lg bg-indigo-50'
>
<
div
className=
'flex justify-center items-center w-8 h-8 rounded-lg bg-indigo-50'
>
<
MessageChatSquare
className=
'w-4 h-4'
/>
<
MessageChatSquare
className=
'w-4 h-4'
/>
...
...
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