mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 10:25:52 +08:00
Hide the copy button when there is no content to copy (#4546)
This commit is contained in:
parent
d5a33a0323
commit
ee53f98d8c
@ -119,8 +119,8 @@ const WorkflowPreview = () => {
|
|||||||
error={workflowRunningData?.result?.error}
|
error={workflowRunningData?.result?.error}
|
||||||
onClick={() => switchTab('DETAIL')}
|
onClick={() => switchTab('DETAIL')}
|
||||||
/>
|
/>
|
||||||
|
{(workflowRunningData?.result.status !== WorkflowRunningStatus.Succeeded || !workflowRunningData?.resultText) && (
|
||||||
<SimpleBtn
|
<SimpleBtn
|
||||||
isDisabled={workflowRunningData?.result.status !== WorkflowRunningStatus.Succeeded}
|
|
||||||
className={cn('ml-4 mb-4 inline-flex space-x-1')}
|
className={cn('ml-4 mb-4 inline-flex space-x-1')}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const content = workflowRunningData?.resultText
|
const content = workflowRunningData?.resultText
|
||||||
@ -133,6 +133,7 @@ const WorkflowPreview = () => {
|
|||||||
<Clipboard className='w-3.5 h-3.5' />
|
<Clipboard className='w-3.5 h-3.5' />
|
||||||
<div>{t('common.operation.copy')}</div>
|
<div>{t('common.operation.copy')}</div>
|
||||||
</SimpleBtn>
|
</SimpleBtn>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{currentTab === 'DETAIL' && (
|
{currentTab === 'DETAIL' && (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user