()
| 18483 | |
| 18484 | try { |
| 18485 | const result = await postPwnAPI('/api/pwnagotchi/install', clean ? { clean: true } : {}); |
| 18486 | addConsoleMessage(`Pwnagotchi ${verb.toLowerCase()} started`, 'success'); |
| 18487 | if (result && result.status) { |
| 18488 | updatePwnagotchiUI(result.status); |
| 18489 | } else { |
| 18490 | refreshPwnagotchiStatus({ silent: true }); |
| 18491 | } |
| 18492 | } catch (error) { |
| 18493 | console.error(`Failed to start Pwnagotchi ${verb.toLowerCase()}:`, error); |
| 18494 | addConsoleMessage(`${verb} failed: ${error.message}`, 'error'); |
| 18495 | stopPwnLogStreaming(); |
| 18496 | setPwnLogEmptyMessage('Installer failed to start. Check Ragnar logs for details.'); |
| 18497 | } finally { |
| 18498 | updatePwnButtons(); |
| 18499 | } |
| 18500 | } |
| 18501 | |
| 18502 | function handlePwnInstallClick() { |
| 18503 | return runPwnInstaller('install'); |
| 18504 | } |
| 18505 | |
| 18506 | function handlePwnRepairClick() { |
| 18507 | return runPwnInstaller('repair'); |
| 18508 | } |
no outgoing calls
no test coverage detected