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
5a402b5a
Commit
5a402b5a
authored
Jun 28, 2023
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: handle remove current conversation
parent
25440279
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
index.tsx
web/app/components/share/chat/index.tsx
+3
-0
index.tsx
web/app/components/share/chat/sidebar/index.tsx
+3
-2
No files found.
web/app/components/share/chat/index.tsx
View file @
5a402b5a
...
@@ -142,6 +142,9 @@ const Main: FC<IMainProps> = ({
...
@@ -142,6 +142,9 @@ const Main: FC<IMainProps> = ({
await
delConversation
(
isInstalledApp
,
installedAppInfo
?.
id
,
toDeleteConversationId
)
await
delConversation
(
isInstalledApp
,
installedAppInfo
?.
id
,
toDeleteConversationId
)
notify
({
type
:
'success'
,
message
:
t
(
'common.api.success'
)
})
notify
({
type
:
'success'
,
message
:
t
(
'common.api.success'
)
})
hideConfirm
()
hideConfirm
()
if
(
currConversationId
===
toDeleteConversationId
)
handleConversationIdChange
(
'-1'
)
noticeUpdateList
()
noticeUpdateList
()
}
}
...
...
web/app/components/share/chat/sidebar/index.tsx
View file @
5a402b5a
...
@@ -102,7 +102,7 @@ const Sidebar: FC<ISidebarProps> = ({
...
@@ -102,7 +102,7 @@ const Sidebar: FC<ISidebarProps> = ({
<
div
className=
'mt-4 px-4'
>
<
div
className=
'mt-4 px-4'
>
<
div
className=
'mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
{
t
(
'share.chat.pinnedTitle'
)
}
</
div
>
<
div
className=
'mb-1.5 leading-[18px] text-xs text-gray-500 font-medium uppercase'
>
{
t
(
'share.chat.pinnedTitle'
)
}
</
div
>
<
List
<
List
className=
{
maxListHeight
}
className=
{
cn
(
list
.
length
>
0
?
maxListHeight
:
'flex-grow'
)
}
currentId=
{
currentId
}
currentId=
{
currentId
}
onCurrentIdChange=
{
onCurrentIdChange
}
onCurrentIdChange=
{
onCurrentIdChange
}
list=
{
pinnedList
}
list=
{
pinnedList
}
...
@@ -120,7 +120,7 @@ const Sidebar: FC<ISidebarProps> = ({
...
@@ -120,7 +120,7 @@ const Sidebar: FC<ISidebarProps> = ({
)
}
)
}
{
/* unpinned list */
}
{
/* unpinned list */
}
<
div
className=
'mt-4 px-4'
>
<
div
className=
'mt-4 px-4'
>
{
hasPinned
&&
(
{
(
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
...
@@ -139,6 +139,7 @@ const Sidebar: FC<ISidebarProps> = ({
...
@@ -139,6 +139,7 @@ const Sidebar: FC<ISidebarProps> = ({
onDelete=
{
onDelete
}
onDelete=
{
onDelete
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
"flex flex-shrink-0 pr-4 pb-4 pl-4"
>
<
div
className=
"flex flex-shrink-0 pr-4 pb-4 pl-4"
>
<
div
className=
"text-gray-400 font-normal text-xs"
>
©
{
copyRight
}
{
(
new
Date
()).
getFullYear
()
}
</
div
>
<
div
className=
"text-gray-400 font-normal text-xs"
>
©
{
copyRight
}
{
(
new
Date
()).
getFullYear
()
}
</
div
>
...
...
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