()
| 17619 | // clean reinstall) — don't alarm the user with a red "Needs Repair". |
| 17620 | badge.textContent = 'Installing…'; |
| 17621 | badge.classList.add('bg-sky-900/60', 'text-sky-300'); |
| 17622 | } else if (!anyMissing) { |
| 17623 | badge.textContent = 'Healthy'; |
| 17624 | badge.classList.add('bg-green-900/60', 'text-green-300'); |
| 17625 | } else if (missingCritical.length) { |
| 17626 | badge.textContent = 'Needs Repair'; |
| 17627 | badge.classList.add('bg-red-900/60', 'text-red-300'); |
| 17628 | } else { |
| 17629 | // Only recommended (non-critical) pieces missing — runs, but degraded. |
| 17630 | badge.textContent = 'Degraded'; |
| 17631 | badge.classList.add('bg-amber-900/60', 'text-amber-300'); |
| 17632 | } |
| 17633 | } |
| 17634 | |
| 17635 | // Offer Repair whenever anything is missing — including non-critical drift |
| 17636 | // such as the service ExecStart being reverted away from the launcher |
| 17637 | // (e.g. by Pwnagotchi's own updater). Re-running the installer is idempotent. |
| 17638 | const repair = document.getElementById('pwn-health-repair'); |
| 17639 | const showRepair = anyMissing && !status.installing; |
nothing calls this directly
no outgoing calls
no test coverage detected