| 
									
										
										
										
											2024-12-20 15:44:37 +08:00
										 |  |  | 'use client' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import type { FC } from 'react' | 
					
						
							|  |  |  | import { memo } from 'react' | 
					
						
							|  |  |  | import { useTranslation } from 'react-i18next' | 
					
						
							|  |  |  | import { | 
					
						
							|  |  |  |   RiArrowLeftLine, | 
					
						
							|  |  |  | } from '@remixicon/react' | 
					
						
							| 
									
										
										
										
											2025-02-17 17:05:13 +08:00
										 |  |  | import TracingPanel from '../tracing-panel' | 
					
						
							| 
									
										
										
										
											2024-12-20 15:44:37 +08:00
										 |  |  | import type { NodeTracing } from '@/types/workflow' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type Props = { | 
					
						
							|  |  |  |   list: NodeTracing[] | 
					
						
							|  |  |  |   onBack: () => void | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const RetryResultPanel: FC<Props> = ({ | 
					
						
							|  |  |  |   list, | 
					
						
							|  |  |  |   onBack, | 
					
						
							|  |  |  | }) => { | 
					
						
							|  |  |  |   const { t } = useTranslation() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <div> | 
					
						
							|  |  |  |       <div | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |         className='system-sm-medium flex h-8 cursor-pointer items-center bg-components-panel-bg px-4 text-text-accent-secondary' | 
					
						
							| 
									
										
										
										
											2024-12-20 15:44:37 +08:00
										 |  |  |         onClick={(e) => { | 
					
						
							|  |  |  |           e.stopPropagation() | 
					
						
							|  |  |  |           e.nativeEvent.stopImmediatePropagation() | 
					
						
							|  |  |  |           onBack() | 
					
						
							|  |  |  |         }} | 
					
						
							|  |  |  |       > | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |         <RiArrowLeftLine className='mr-1 h-4 w-4' /> | 
					
						
							| 
									
										
										
										
											2024-12-20 15:44:37 +08:00
										 |  |  |         {t('workflow.singleRun.back')} | 
					
						
							|  |  |  |       </div> | 
					
						
							|  |  |  |       <TracingPanel | 
					
						
							|  |  |  |         list={list.map((item, index) => ({ | 
					
						
							|  |  |  |           ...item, | 
					
						
							|  |  |  |           title: `${t('workflow.nodes.common.retry.retry')} ${index + 1}`, | 
					
						
							|  |  |  |         }))} | 
					
						
							|  |  |  |         className='bg-background-section-burn' | 
					
						
							|  |  |  |       /> | 
					
						
							|  |  |  |     </div > | 
					
						
							|  |  |  |   ) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | export default memo(RetryResultPanel) |