(status, options = {})
| 14455 | } |
| 14456 | } |
| 14457 | |
| 14458 | async function loadFilesData() { |
| 14459 | try { |
| 14460 | displayDirectoryTree(); |
| 14461 | loadFiles('/'); |
| 14462 | // Don't automatically load images - user must click "Load Images" button |
| 14463 | } catch (error) { |
| 14464 | console.error('Error loading files data:', error); |
| 14465 | } |
| 14466 | } |
| 14467 | |
| 14468 | // ============================================================================ |
| 14469 | // PWNAGOTCHI VISIBILITY MANAGEMENT |
| 14470 | // ============================================================================ |
| 14471 | |
| 14472 | function arePwnFeaturesEnabled() { |
| 14473 | return localStorage.getItem('pwnagotchi-enabled') === 'true'; |
| 14474 | } |
| 14475 | |
| 14476 | function applyPwnVisibilityPreference(isEnabled) { |
| 14477 | const pwnSection = document.getElementById('pwnagotchi-section'); |
| 14478 | if (pwnSection) { |
| 14479 | pwnSection.style.display = isEnabled ? 'block' : 'none'; |
| 14480 | } |
| 14481 | updatePwnDiscoveredCard(pwnStatus); |
| 14482 | |
| 14483 | // Bind Update-card buttons and fire one-shot check on first reveal. |
| 14484 | if (isEnabled) { |
| 14485 | _bindPwnUpdateButtons(); |
| 14486 | if (!pwnUpdateInitialChecked) { |
| 14487 | pwnUpdateInitialChecked = true; |
| 14488 | checkPwnUpdates(); |
| 14489 | } |
| 14490 | } |
| 14491 | } |
| 14492 |
no test coverage detected