Spaces:
Sleeping
Sleeping
Download src/components/PipelineFlow.jsx from tryprogram/offer-puplayer: direct link, hf CLI and curl.
- Browser
- Download file 1.38 kB
-
https://huggingface.co/spaces/tryprogram/offer-puplayer/resolve/main/src/components/PipelineFlow.jsx
- Command line
-
hf download hf://spaces/tryprogram/offer-puplayer/src/components/PipelineFlow.jsx
-
curl -L -o PipelineFlow.jsx https://huggingface.co/spaces/tryprogram/offer-puplayer/resolve/main/src/components/PipelineFlow.jsx
1.38 kB
| function PipelineFlow({ steps = [] }) { | |
| return ( | |
| <div className="flex-center" style={{ padding: '24px 0' }}> | |
| {steps.map((step, index) => { | |
| const isLast = index === steps.length - 1 | |
| return ( | |
| <div key={step.id} className="flex-center"> | |
| <div className="flex flex-col flex-center gap-8"> | |
| <div | |
| className={`pipeline-node pipeline-node-${step.status}`} | |
| > | |
| {step.status === 'completed' && '✓'} | |
| {step.status === 'error' && '❗'} | |
| {(step.status === 'idle' || step.status === 'running') && ( | |
| <span className={step.status === 'running' ? 'pipeline-step-running' : ''}> | |
| {step.icon || '○'} | |
| </span> | |
| )} | |
| </div> | |
| <span className={`text-sm pipeline-label-${step.status}`}> | |
| {step.label} | |
| </span> | |
| {step.status === 'error' && ( | |
| <span className="text-sm text-error">暂不可用</span> | |
| )} | |
| </div> | |
| {!isLast && ( | |
| <div | |
| className={`pipeline-connector pipeline-connector-${step.status === 'completed' ? 'completed' : 'idle'}`} | |
| /> | |
| )} | |
| </div> | |
| ) | |
| })} | |
| </div> | |
| ) | |
| } | |
| export default PipelineFlow | |