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
1b3028d7
Commit
1b3028d7
authored
Jun 14, 2023
by
JzoNg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: file icon
parent
3cbd57f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
index.module.css
...onents/datasets/create/embedding-process/index.module.css
+31
-0
index.tsx
...pp/components/datasets/create/embedding-process/index.tsx
+2
-1
No files found.
web/app/components/datasets/create/embedding-process/index.module.css
View file @
1b3028d7
...
@@ -78,3 +78,34 @@
...
@@ -78,3 +78,34 @@
color
:
#f79009
;
color
:
#f79009
;
@apply
text-xs
font-medium;
@apply
text-xs
font-medium;
}
}
.fileIcon
{
@apply
w-4
h-4
mr-1
bg-center
bg-no-repeat;
background-image
:
url(../assets/unknow.svg)
;
background-size
:
16px
;
}
.fileIcon.csv
{
background-image
:
url(../assets/csv.svg)
;
}
.fileIcon.xlsx
,
.fileIcon.xls
{
background-image
:
url(../assets/xlsx.svg)
;
}
.fileIcon.pdf
{
background-image
:
url(../assets/pdf.svg)
;
}
.fileIcon.html
,
.fileIcon.htm
{
background-image
:
url(../assets/html.svg)
;
}
.fileIcon.md
,
.fileIcon.markdown
{
background-image
:
url(../assets/md.svg)
;
}
.fileIcon.txt
{
background-image
:
url(../assets/txt.svg)
;
}
.fileIcon.json
{
background-image
:
url(../assets/json.svg)
;
}
web/app/components/datasets/create/embedding-process/index.tsx
View file @
1b3028d7
...
@@ -146,6 +146,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
...
@@ -146,6 +146,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
const
doc
=
documents
.
find
(
document
=>
document
.
id
===
id
)
const
doc
=
documents
.
find
(
document
=>
document
.
id
===
id
)
return
doc
?.
name
return
doc
?.
name
}
}
const
getFileType
=
(
name
?:
string
)
=>
name
?.
split
(
'.'
).
pop
()
||
'txt'
const
getSourcePercent
=
(
detail
:
IndexingStatusResponse
)
=>
{
const
getSourcePercent
=
(
detail
:
IndexingStatusResponse
)
=>
{
const
completedCount
=
detail
.
completed_segments
||
0
const
completedCount
=
detail
.
completed_segments
||
0
const
totalCount
=
detail
.
total_segments
||
0
const
totalCount
=
detail
.
total_segments
||
0
...
@@ -202,7 +203,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
...
@@ -202,7 +203,7 @@ const EmbeddingProcess: FC<Props> = ({ datasetId, batchId, documents = [], index
)
}
)
}
<
div
className=
{
s
.
info
}
>
<
div
className=
{
s
.
info
}
>
{
getSourceType
(
indexingStatusDetail
.
id
)
===
DataSourceType
.
FILE
&&
(
{
getSourceType
(
indexingStatusDetail
.
id
)
===
DataSourceType
.
FILE
&&
(
<
div
className=
{
s
.
type
}
></
div
>
<
div
className=
{
cn
(
s
.
fileIcon
,
s
[
getFileType
(
getSourceName
(
indexingStatusDetail
.
id
))])
}
/
>
)
}
)
}
{
getSourceType
(
indexingStatusDetail
.
id
)
===
DataSourceType
.
NOTION
&&
(
{
getSourceType
(
indexingStatusDetail
.
id
)
===
DataSourceType
.
NOTION
&&
(
<
NotionIcon
<
NotionIcon
...
...
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