mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-16 05:08:18 +08:00
fix: text generation app not show copy button (#4304)
This commit is contained in:
parent
4af00e4a45
commit
aa5ca90f00
@ -322,16 +322,16 @@ const GenerationItem: FC<IGenerationItemProps> = ({
|
|||||||
</SimpleBtn>
|
</SimpleBtn>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
{currentTab === 'RESULT' && (
|
{(currentTab === 'RESULT' || !isWorkflow) && (
|
||||||
<SimpleBtn
|
<SimpleBtn
|
||||||
isDisabled={isError || !messageId}
|
isDisabled={isError || !messageId}
|
||||||
className={cn(isMobile && '!px-1.5', 'space-x-1')}
|
className={cn(isMobile && '!px-1.5', 'space-x-1')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const content = workflowProcessData?.resultText
|
const copyContent = isWorkflow ? workflowProcessData?.resultText : content
|
||||||
if (typeof content === 'string')
|
if (typeof copyContent === 'string')
|
||||||
copy(content)
|
copy(copyContent)
|
||||||
else
|
else
|
||||||
copy(JSON.stringify(content))
|
copy(JSON.stringify(copyContent))
|
||||||
Toast.notify({ type: 'success', message: t('common.actionMsg.copySuccessfully') })
|
Toast.notify({ type: 'success', message: t('common.actionMsg.copySuccessfully') })
|
||||||
}}>
|
}}>
|
||||||
<Clipboard className='w-3.5 h-3.5' />
|
<Clipboard className='w-3.5 h-3.5' />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user