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
c3275dfd
Unverified
Commit
c3275dfd
authored
Dec 19, 2023
by
Joel
Committed by
GitHub
Dec 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: not return annotation author error happens (#1793)
parent
43741ad5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
index.tsx
web/app/components/app/annotation/header-opts/index.tsx
+2
-1
index.tsx
web/app/components/app/chat/answer/index.tsx
+1
-1
list.tsx
web/app/components/app/log/list.tsx
+1
-1
index.tsx
web/app/components/base/popover/index.tsx
+9
-7
No files found.
web/app/components/app/annotation/header-opts/index.tsx
View file @
c3275dfd
...
...
@@ -114,7 +114,8 @@ const HeaderOptions: FC<Props> = ({
)
}
// !w-[208px]
className=
{
'!w-[131px] h-fit !z-20'
}
className=
{
'!w-[135px] h-fit !z-20'
}
popupClassName=
'!w-full'
manualClose
/>
{
showAddModal
&&
(
...
...
web/app/components/app/chat/answer/index.tsx
View file @
c3275dfd
...
...
@@ -247,7 +247,7 @@ const Answer: FC<IAnswerProps> = ({
<
Markdown
className=
'line-through !text-gray-400'
content=
{
content
}
/>
</
div
>
<
EditTitle
title=
{
t
(
'appAnnotation.editBy'
,
{
author
:
annotation
?.
logAnnotation
.
account
.
name
,
author
:
annotation
?.
logAnnotation
.
account
?
.
name
,
})
}
/>
</
div
>
)
}
...
...
web/app/components/app/log/list.tsx
View file @
c3275dfd
...
...
@@ -100,7 +100,7 @@ const getFormattedChatList = (messages: ChatMessage[]) => {
if
(
item
.
annotation_hit_history
)
{
return
{
id
:
item
.
annotation_hit_history
.
annotation_id
,
authorName
:
item
.
annotation_hit_history
.
annotation_create_account
.
name
,
authorName
:
item
.
annotation_hit_history
.
annotation_create_account
?.
name
||
'N/A'
,
created_at
:
item
.
annotation_hit_history
.
created_at
,
}
}
...
...
web/app/components/base/popover/index.tsx
View file @
c3275dfd
import
{
Popover
,
Transition
}
from
'@headlessui/react'
import
{
Fragment
,
cloneElement
,
useRef
}
from
'react'
import
cn
from
'classnames'
import
s
from
'./style.module.css'
export
type
HtmlContentProps
=
{
...
...
@@ -10,6 +11,7 @@ export type HtmlContentProps = {
type
IPopover
=
{
className
?:
string
htmlContent
:
React
.
ReactElement
<
HtmlContentProps
>
popupClassName
?:
string
trigger
?:
'click'
|
'hover'
position
?:
'bottom'
|
'br'
btnElement
?:
string
|
React
.
ReactNode
...
...
@@ -23,6 +25,7 @@ export default function CustomPopover({
trigger
=
'hover'
,
position
=
'bottom'
,
htmlContent
,
popupClassName
,
btnElement
,
className
,
btnClassName
,
...
...
@@ -57,12 +60,11 @@ export default function CustomPopover({
>
<
Popover
.
Button
ref=
{
buttonRef
}
className=
{
`group ${s.popupBtn} ${open ? '' : 'bg-gray-100'} ${
!btnClassName
? ''
: typeof btnClassName === 'string'
? btnClassName
: btnClassName?.(open)
className=
{
`group ${s.popupBtn} ${open ? '' : 'bg-gray-100'} ${!btnClassName
? ''
: typeof btnClassName === 'string'
? btnClassName
: btnClassName?.(open)
}`
}
>
{
btnElement
}
...
...
@@ -80,7 +82,7 @@ export default function CustomPopover({
>
{
({
close
})
=>
(
<
div
className=
{
s
.
panelContainer
}
className=
{
cn
(
s
.
panelContainer
,
popupClassName
)
}
{
...
(
trigger
!==
'
hover
'
?
{}
:
{
...
...
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