(filterType)
| 14143 | |
| 14144 | function handlePwnInstallClick() { |
| 14145 | return runPwnInstaller('install'); |
| 14146 | } |
| 14147 | |
| 14148 | function handlePwnRepairClick() { |
| 14149 | return runPwnInstaller('repair'); |
| 14150 | } |
| 14151 | |
| 14152 | function handlePwnReinstallClick() { |
| 14153 | return runPwnInstaller('reinstall'); |
| 14154 | } |
| 14155 | |
| 14156 | async function handlePwnSwap(targetMode) { |
| 14157 | const normalized = targetMode === 'pwnagotchi' ? 'pwnagotchi' : 'ragnar'; |
| 14158 | |
| 14159 | if (normalized === 'pwnagotchi' && !pwnStatus.installed) { |
| 14160 | addConsoleMessage('Install Pwnagotchi before swapping', 'warning'); |
| 14161 | return; |
| 14162 | } |
| 14163 | |
| 14164 | const buttonId = normalized === 'pwnagotchi' ? 'pwn-swap-to-pwn-btn' : 'pwn-swap-to-ragnar-btn'; |
| 14165 | const button = document.getElementById(buttonId); |
| 14166 | if (button) { |
| 14167 | button.disabled = true; |
| 14168 | button.textContent = 'Scheduling switch...'; |
| 14169 | button.classList.add('opacity-60', 'cursor-not-allowed'); |
no test coverage detected