(scans)
| 19075 | const statusDiv = document.getElementById('bt-device-status'); |
| 19076 | const servicesDiv = document.getElementById('bt-device-services'); |
| 19077 | |
| 19078 | if (!enumerateBtn) return; |
| 19079 | |
| 19080 | const address = document.getElementById('bt-pair-btn')?.getAttribute('data-device-address'); |
| 19081 | if (!address) return; |
| 19082 | |
| 19083 | const device = currentBluetoothDevices.find(d => d.address === address); |
| 19084 | if (!device) return; |
| 19085 | |
| 19086 | const originalHTML = enumerateBtn.innerHTML; |
| 19087 | enumerateBtn.innerHTML = 'Enumerating...'; |
| 19088 | enumerateBtn.disabled = true; |
| 19089 | |
| 19090 | if (statusDiv) { |
| 19091 | statusDiv.classList.remove('hidden'); |
| 19092 | statusDiv.innerHTML = ` |
| 19093 | <div class="bg-blue-600 rounded p-3 text-sm"> |
| 19094 | Enumerating services for ${escapeHtml(device.name || address)}... |
| 19095 | </div> |
| 19096 | `; |
| 19097 | } |
| 19098 | |
| 19099 | try { |
| 19100 | const response = await postAPI('/api/bluetooth/enumerate', { |
| 19101 | address: address |
| 19102 | }); |
no test coverage detected