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
a0907674
Commit
a0907674
authored
Jun 15, 2023
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: header-nav
parent
9da3cc6c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
index.tsx
web/app/components/datasets/documents/index.tsx
+2
-2
index.tsx
web/app/components/header/nav/nav-selector/index.tsx
+4
-4
No files found.
web/app/components/datasets/documents/index.tsx
View file @
a0907674
...
...
@@ -82,7 +82,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
const
router
=
useRouter
()
const
{
dataset
}
=
useDatasetDetailContext
()
const
[
notionPageSelectorModalVisible
,
setNotionPageSelectorModalVisible
]
=
useState
(
false
)
const
[
timerCanRun
,
setTimerCanRun
]
=
useState
(
fals
e
)
const
[
timerCanRun
,
setTimerCanRun
]
=
useState
(
tru
e
)
const
query
=
useMemo
(()
=>
{
return
{
page
:
currPage
+
1
,
limit
,
keyword
:
searchValue
}
...
...
@@ -100,7 +100,7 @@ const Documents: FC<IDocumentsProps> = ({ datasetId }) => {
const
progressPercentMap
=
datasetIndexingStatus
?.
data
.
reduce
((
prev
:
Record
<
string
,
number
>
,
next
:
IndexingStatusResponse
)
=>
{
const
{
id
,
completed_segments
,
total_segments
,
indexing_status
}
=
next
if
(
indexing_status
===
'completed'
)
if
(
indexing_status
===
'completed'
||
indexing_status
===
'paused'
||
indexing_status
===
'error'
)
completedNum
++
const
completedCount
=
completed_segments
||
0
const
totalCount
=
total_segments
||
0
...
...
web/app/components/header/nav/nav-selector/index.tsx
View file @
a0907674
...
...
@@ -24,7 +24,7 @@ export type INavSelectorProps = {
const
itemClassName
=
`
flex items-center w-full h-10 px-3 text-gray-700 text-[14px]
rounded-lg font-normal hover:bg-gray-100 cursor-pointer
rounded-lg font-normal hover:bg-gray-100 cursor-pointer
truncate
`
const
NavSelector
=
({
curNav
,
navs
,
createText
,
onCreate
,
onLoadmore
}:
INavSelectorProps
)
=>
{
...
...
@@ -50,9 +50,9 @@ const NavSelector = ({ curNav, navs, createText, onCreate, onLoadmore }: INavSel
text-[#1C64F2] hover:bg-[#EBF5FF]
"
>
{
curNav
?.
name
}
<
div
className=
'max-w-[180px] truncate'
title=
{
curNav
?.
name
}
>
{
curNav
?.
name
}
</
div
>
<
ChevronDownIcon
className=
"w-3 h-3 ml-1"
className=
"
shrink-0
w-3 h-3 ml-1"
aria
-
hidden=
"true"
/>
</
Menu
.
Button
>
...
...
@@ -68,7 +68,7 @@ const NavSelector = ({ curNav, navs, createText, onCreate, onLoadmore }: INavSel
{
navs
.
map
(
nav
=>
(
<
Menu
.
Item
key=
{
nav
.
id
}
>
<
div
className=
{
itemClassName
}
onClick=
{
()
=>
router
.
push
(
nav
.
link
)
}
>
<
div
className=
{
itemClassName
}
onClick=
{
()
=>
router
.
push
(
nav
.
link
)
}
title=
{
nav
.
name
}
>
<
div
className=
'relative w-6 h-6 mr-2 bg-[#D5F5F6] rounded-[6px]'
>
<
AppIcon
size=
'tiny'
icon=
{
nav
.
icon
}
background=
{
nav
.
icon_background
}
/>
<
div
className=
'flex justify-center items-center absolute -right-0.5 -bottom-0.5 w-2.5 h-2.5 bg-white rounded'
>
...
...
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