| 13880 | function networkRowHTML(net) { |
| 13881 | const ssid = escapeHtml(net.ssid || 'Unknown'); |
| 13882 | const bssid = escapeHtml(net.bssid || 'Unknown'); |
| 13883 | const lastSeen = net.last_seen ? formatTimestamp(net.last_seen) : 'Unknown'; |
| 13884 | return ` |
| 13885 | <tr class="hover:bg-gray-700 transition-colors"> |
| 13886 | <td class="px-4 py-3 text-sm text-white font-semibold">${ssid}</td> |
| 13887 | <td class="px-4 py-3 text-sm text-gray-300 font-mono">${bssid}</td> |
| 13888 | <td class="px-4 py-3 text-sm">${_pwnBadgesHTML(net)}</td> |
| 13889 | <td class="px-4 py-3 text-sm">${_pwnGpsHTML(net)}</td> |
| 13890 | <td class="px-4 py-3 text-sm text-gray-400 whitespace-nowrap">${lastSeen}</td> |
| 13891 | <td class="px-4 py-3 text-sm">${_pwnFilesHTML(net.files)}</td> |
| 13892 | </tr>`; |
| 13893 | } |
| 13894 | |
| 13895 | /* --- Build mobile cards --- */ |
| 13896 | let mobileHTML = '<div class="md:hidden space-y-3">'; |
| 13897 | previewItems.forEach(net => { mobileHTML += networkCardHTML(net); }); |
| 13898 | if (hasMore) { |
| 13899 | mobileHTML += ` |
| 13900 | <button onclick="togglePwnNetworksExpansion()" |
| 13901 | class="flex items-center justify-center w-full py-3 px-4 bg-gray-700 hover:bg-gray-600 rounded-lg transition-colors text-gray-300 hover:text-white"> |
| 13902 | <span id="pwn-networks-expand-text-m">Show ${hiddenItems.length} more</span> |
| 13903 | <svg id="pwn-networks-expand-arrow-m" class="w-4 h-4 ml-2 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 13904 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> |
| 13905 | </svg> |
| 13906 | </button> |
| 13907 | <div id="pwn-networks-hidden-m" class="hidden space-y-3">`; |
| 13908 | hiddenItems.forEach(net => { mobileHTML += networkCardHTML(net); }); |
| 13909 | mobileHTML += '</div>'; |
| 13910 | } |
| 13911 | mobileHTML += '</div>'; |
| 13912 | |
| 13913 | /* --- Build desktop table --- */ |
| 13914 | let tableHTML = ` |
| 13915 | <div class="hidden md:block bg-gray-800 rounded-lg p-4"> |
| 13916 | <div class="overflow-x-auto"> |
| 13917 | <table class="min-w-full divide-y divide-gray-700"> |
| 13918 | <thead> |
| 13919 | <tr> |
| 13920 | <th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase">SSID</th> |
| 13921 | <th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase">BSSID</th> |
| 13922 | <th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase">Data</th> |
| 13923 | <th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase">GPS</th> |
| 13924 | <th class="px-4 py-2 text-left text-xs font-medium text-gray-300 uppercase">Last Seen</th> |