mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 10:38:59 +08:00
Fix: show feedback status in conversation (#16615)
This commit is contained in:
parent
05eaef84bb
commit
815d77856d
@ -81,13 +81,13 @@ const Operation: FC<OperationProps> = ({
|
|||||||
const operationWidth = useMemo(() => {
|
const operationWidth = useMemo(() => {
|
||||||
let width = 0
|
let width = 0
|
||||||
if (!isOpeningStatement)
|
if (!isOpeningStatement)
|
||||||
width += 28
|
width += 26
|
||||||
if (!isOpeningStatement && showPromptLog)
|
if (!isOpeningStatement && showPromptLog)
|
||||||
width += 102 + 8
|
width += 28 + 8
|
||||||
if (!isOpeningStatement && config?.text_to_speech?.enabled)
|
if (!isOpeningStatement && config?.text_to_speech?.enabled)
|
||||||
width += 33
|
width += 26
|
||||||
if (!isOpeningStatement && config?.supportAnnotation && config?.annotation_reply?.enabled)
|
if (!isOpeningStatement && config?.supportAnnotation && config?.annotation_reply?.enabled)
|
||||||
width += 56 + 8
|
width += 26
|
||||||
if (config?.supportFeedback && !localFeedback?.rating && onFeedback && !isOpeningStatement)
|
if (config?.supportFeedback && !localFeedback?.rating && onFeedback && !isOpeningStatement)
|
||||||
width += 60 + 8
|
width += 60 + 8
|
||||||
if (config?.supportFeedback && localFeedback?.rating && onFeedback && !isOpeningStatement)
|
if (config?.supportFeedback && localFeedback?.rating && onFeedback && !isOpeningStatement)
|
||||||
@ -140,7 +140,7 @@ const Operation: FC<OperationProps> = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{!isOpeningStatement && config?.supportFeedback && onFeedback && (
|
{!isOpeningStatement && config?.supportFeedback && !localFeedback?.rating && onFeedback && (
|
||||||
<div className='ml-1 hidden items-center gap-0.5 rounded-[10px] border-[0.5px] border-components-actionbar-border bg-components-actionbar-bg p-0.5 shadow-md backdrop-blur-sm group-hover:flex'>
|
<div className='ml-1 hidden items-center gap-0.5 rounded-[10px] border-[0.5px] border-components-actionbar-border bg-components-actionbar-bg p-0.5 shadow-md backdrop-blur-sm group-hover:flex'>
|
||||||
{!localFeedback?.rating && (
|
{!localFeedback?.rating && (
|
||||||
<>
|
<>
|
||||||
@ -152,6 +152,10 @@ const Operation: FC<OperationProps> = ({
|
|||||||
</ActionButton>
|
</ActionButton>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!isOpeningStatement && config?.supportFeedback && localFeedback?.rating && onFeedback && (
|
||||||
|
<div className='ml-1 flex items-center gap-0.5 rounded-[10px] border-[0.5px] border-components-actionbar-border bg-components-actionbar-bg p-0.5 shadow-md backdrop-blur-sm'>
|
||||||
{localFeedback?.rating === 'like' && (
|
{localFeedback?.rating === 'like' && (
|
||||||
<ActionButton state={ActionButtonState.Active} onClick={() => handleFeedback(null)}>
|
<ActionButton state={ActionButtonState.Active} onClick={() => handleFeedback(null)}>
|
||||||
<RiThumbUpLine className='h-4 w-4' />
|
<RiThumbUpLine className='h-4 w-4' />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user