Download frontend/src/InspectionAction.jsx from Wizzas/DefectRAG: direct link, hf CLI and curl.
- Browser
- Download file 999 Bytes
-
https://huggingface.co/Wizzas/DefectRAG/resolve/main/frontend/src/InspectionAction.jsx
- Command line
-
hf download hf://Wizzas/DefectRAG/frontend/src/InspectionAction.jsx
-
curl -L -o InspectionAction.jsx https://huggingface.co/Wizzas/DefectRAG/resolve/main/frontend/src/InspectionAction.jsx
999 Bytes
| import React from 'react'; | |
| import {ScanLine,LoaderCircle} from 'lucide-react'; | |
| import {teamInspectionGuidance} from './inspectionReadiness.mjs'; | |
| export default function InspectionAction({readiness,busy,multiple,onRun,onSwitch,switchDisabled=false}){ | |
| return <> | |
| <button type="button" className="primary wide" disabled={readiness.disabled} aria-describedby={readiness.disabled?'inspection-run-reason':undefined} title={readiness.reason||undefined} onClick={onRun}> | |
| {busy?<LoaderCircle className="spin" size={18}/>:<ScanLine size={18}/>} {busy?'Inspecting image…':multiple?'Inspect batch':'Run inspection'} | |
| </button> | |
| {readiness.disabled&&<p id="inspection-run-reason" className="caption" role="status">{readiness.reason}</p>} | |
| {readiness.teamRestricted&&<> | |
| {readiness.code!=='team'&&<p className="caption">{teamInspectionGuidance}</p>} | |
| <button type="button" className="secondary wide" disabled={switchDisabled} onClick={onSwitch}>Switch to Personal Workspace</button> | |
| </>} | |
| </>; | |
| } | |