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
7fc4775d
Commit
7fc4775d
authored
Jul 26, 2023
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: handle pin list max height
parent
9af05a3f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
index.tsx
web/app/components/share/chat/sidebar/index.tsx
+2
-2
index.tsx
web/app/components/share/chat/sidebar/list/index.tsx
+1
-1
No files found.
web/app/components/share/chat/sidebar/index.tsx
View file @
7fc4775d
...
@@ -129,12 +129,12 @@ const Sidebar: FC<ISidebarProps> = ({
...
@@ -129,12 +129,12 @@ const Sidebar: FC<ISidebarProps> = ({
</
div
>
</
div
>
)
}
)
}
{
/* unpinned list */
}
{
/* unpinned list */
}
<
div
className=
{
cn
(
'mt-4 px-4'
,
!
hasPinned
&&
'flex flex-col flex-grow'
)
}
>
<
div
className=
{
cn
(
'
grow flex flex-col
mt-4 px-4'
,
!
hasPinned
&&
'flex flex-col flex-grow'
)
}
>
{
(
hasPinned
&&
list
.
length
>
0
)
&&
(
{
(
hasPinned
&&
list
.
length
>
0
)
&&
(
<
div
className=
'mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
{
t
(
'share.chat.unpinnedTitle'
)
}
</
div
>
<
div
className=
'mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
{
t
(
'share.chat.unpinnedTitle'
)
}
</
div
>
)
}
)
}
<
List
<
List
className=
{
cn
(
hasPinned
?
maxListHeight
:
'flex-grow
'
)
}
className=
{
cn
(
'flex-grow h-0
'
)
}
currentId=
{
currentId
}
currentId=
{
currentId
}
onCurrentIdChange=
{
onCurrentIdChange
}
onCurrentIdChange=
{
onCurrentIdChange
}
list=
{
list
}
list=
{
list
}
...
...
web/app/components/share/chat/sidebar/list/index.tsx
View file @
7fc4775d
...
@@ -75,7 +75,7 @@ const List: FC<IListProps> = ({
...
@@ -75,7 +75,7 @@ const List: FC<IListProps> = ({
return
(
return
(
<
nav
<
nav
ref=
{
listRef
}
ref=
{
listRef
}
className=
{
cn
(
className
,
'shrink-0 space-y-1 bg-white overflow-y-auto'
)
}
className=
{
cn
(
className
,
'shrink-0 space-y-1 bg-white overflow-y-auto
overflow-x-hidden
'
)
}
>
>
{
list
.
map
((
item
)
=>
{
{
list
.
map
((
item
)
=>
{
const
isCurrent
=
item
.
id
===
currentId
const
isCurrent
=
item
.
id
===
currentId
...
...
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