Chore: frontend infrastructure upgrade (#16420)
Co-authored-by: NFish <douxc512@gmail.com> Co-authored-by: zxhlyh <jasonapring2015@outlook.com> Co-authored-by: twwu <twwu@dify.ai> Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
@@ -49,20 +49,20 @@ const WorkflowPreview = () => {
|
||||
|
||||
return (
|
||||
<div className={`
|
||||
flex flex-col w-[420px] h-full rounded-l-2xl border-[0.5px] border-gray-200 shadow-xl bg-white
|
||||
flex h-full w-[420px] flex-col rounded-l-2xl border-[0.5px] border-gray-200 bg-white shadow-xl
|
||||
`}>
|
||||
<div className='flex items-center justify-between p-4 pb-1 text-base font-semibold text-gray-900'>
|
||||
{`Test Run${!workflowRunningData?.result.sequence_number ? '' : `#${workflowRunningData?.result.sequence_number}`}`}
|
||||
<div className='p-1 cursor-pointer' onClick={() => handleCancelDebugAndPreviewPanel()}>
|
||||
<RiCloseLine className='w-4 h-4 text-gray-500' />
|
||||
<div className='cursor-pointer p-1' onClick={() => handleCancelDebugAndPreviewPanel()}>
|
||||
<RiCloseLine className='h-4 w-4 text-gray-500' />
|
||||
</div>
|
||||
</div>
|
||||
<div className='grow relative flex flex-col'>
|
||||
<div className='shrink-0 flex items-center px-4 border-b-[0.5px] border-[rgba(0,0,0,0.05)]'>
|
||||
<div className='relative flex grow flex-col'>
|
||||
<div className='flex shrink-0 items-center border-b-[0.5px] border-[rgba(0,0,0,0.05)] px-4'>
|
||||
{showInputsPanel && (
|
||||
<div
|
||||
className={cn(
|
||||
'mr-6 py-3 border-b-2 border-transparent text-[13px] font-semibold leading-[18px] text-gray-400 cursor-pointer',
|
||||
'mr-6 cursor-pointer border-b-2 border-transparent py-3 text-[13px] font-semibold leading-[18px] text-gray-400',
|
||||
currentTab === 'INPUT' && '!border-[rgb(21,94,239)] text-gray-700',
|
||||
)}
|
||||
onClick={() => switchTab('INPUT')}
|
||||
@@ -70,9 +70,9 @@ const WorkflowPreview = () => {
|
||||
)}
|
||||
<div
|
||||
className={cn(
|
||||
'mr-6 py-3 border-b-2 border-transparent text-[13px] font-semibold leading-[18px] text-gray-400 cursor-pointer',
|
||||
'mr-6 cursor-pointer border-b-2 border-transparent py-3 text-[13px] font-semibold leading-[18px] text-gray-400',
|
||||
currentTab === 'RESULT' && '!border-[rgb(21,94,239)] text-gray-700',
|
||||
!workflowRunningData && 'opacity-30 !cursor-not-allowed',
|
||||
!workflowRunningData && '!cursor-not-allowed opacity-30',
|
||||
)}
|
||||
onClick={() => {
|
||||
if (!workflowRunningData)
|
||||
@@ -82,9 +82,9 @@ const WorkflowPreview = () => {
|
||||
>{t('runLog.result')}</div>
|
||||
<div
|
||||
className={cn(
|
||||
'mr-6 py-3 border-b-2 border-transparent text-[13px] font-semibold leading-[18px] text-gray-400 cursor-pointer',
|
||||
'mr-6 cursor-pointer border-b-2 border-transparent py-3 text-[13px] font-semibold leading-[18px] text-gray-400',
|
||||
currentTab === 'DETAIL' && '!border-[rgb(21,94,239)] text-gray-700',
|
||||
!workflowRunningData && 'opacity-30 !cursor-not-allowed',
|
||||
!workflowRunningData && '!cursor-not-allowed opacity-30',
|
||||
)}
|
||||
onClick={() => {
|
||||
if (!workflowRunningData)
|
||||
@@ -94,9 +94,9 @@ const WorkflowPreview = () => {
|
||||
>{t('runLog.detail')}</div>
|
||||
<div
|
||||
className={cn(
|
||||
'mr-6 py-3 border-b-2 border-transparent text-[13px] font-semibold leading-[18px] text-gray-400 cursor-pointer',
|
||||
'mr-6 cursor-pointer border-b-2 border-transparent py-3 text-[13px] font-semibold leading-[18px] text-gray-400',
|
||||
currentTab === 'TRACING' && '!border-[rgb(21,94,239)] text-gray-700',
|
||||
!workflowRunningData && 'opacity-30 !cursor-not-allowed',
|
||||
!workflowRunningData && '!cursor-not-allowed opacity-30',
|
||||
)}
|
||||
onClick={() => {
|
||||
if (!workflowRunningData)
|
||||
@@ -106,7 +106,7 @@ const WorkflowPreview = () => {
|
||||
>{t('runLog.tracing')}</div>
|
||||
</div>
|
||||
<div className={cn(
|
||||
'grow bg-components-panel-bg h-0 overflow-y-auto rounded-b-2xl',
|
||||
'h-0 grow overflow-y-auto rounded-b-2xl bg-components-panel-bg',
|
||||
(currentTab === 'RESULT' || currentTab === 'TRACING') && '!bg-background-section-burn',
|
||||
)}>
|
||||
{currentTab === 'INPUT' && showInputsPanel && (
|
||||
@@ -123,7 +123,7 @@ const WorkflowPreview = () => {
|
||||
/>
|
||||
{(workflowRunningData?.result.status === WorkflowRunningStatus.Succeeded && workflowRunningData?.resultText && typeof workflowRunningData?.resultText === 'string') && (
|
||||
<Button
|
||||
className={cn('ml-4 mb-4 space-x-1')}
|
||||
className={cn('mb-4 ml-4 space-x-1')}
|
||||
onClick={() => {
|
||||
const content = workflowRunningData?.resultText
|
||||
if (typeof content === 'string')
|
||||
@@ -132,7 +132,7 @@ const WorkflowPreview = () => {
|
||||
copy(JSON.stringify(content))
|
||||
Toast.notify({ type: 'success', message: t('common.actionMsg.copySuccessfully') })
|
||||
}}>
|
||||
<RiClipboardLine className='w-3.5 h-3.5' />
|
||||
<RiClipboardLine className='h-3.5 w-3.5' />
|
||||
<div>{t('common.operation.copy')}</div>
|
||||
</Button>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user