Enforce complete AXIS control inventory

This commit is contained in:
2026-09-07 15:48:49 +08:00
parent 0a679b5eeb
commit bc69c513e3
12 changed files with 261 additions and 54 deletions

View File

@@ -12,7 +12,7 @@ export function XyzacKinematicsControl({ view, command, loading = false }: { vie
{XYZAC_KINEMATICS.map((item) => {
const gate = view.gates[item.action];
const disabled = loading || view.status !== "ready" || gate?.enabled === false;
return <button key={item.type} type="button" className={active === item.type ? "active" : ""} aria-pressed={active === item.type} disabled={disabled} title={gate?.reason ?? item.mcode} onClick={() => command("KINEMATICS_SELECT", { type: item.type }, item.action)}><span>{item.label}</span><small>{item.mcode}</small></button>;
return <button key={item.type} type="button" data-axis-control={`switchkins-${item.type}`} className={active === item.type ? "active" : ""} aria-pressed={active === item.type} disabled={disabled} title={gate?.reason ?? item.mcode} onClick={() => command("KINEMATICS_SELECT", { type: item.type }, item.action)}><span>{item.label}</span><small>{item.mcode}</small></button>;
})}
</div>
</section>;