()
| 302 | } |
| 303 | |
| 304 | export function openApiModal() { |
| 305 | let apiModal = document.getElementById("apiModal"); |
| 306 | if (!apiModal) { |
| 307 | // create the container exactly as you do now inside openUserPanel |
| 308 | apiModal = document.createElement("div"); |
| 309 | apiModal.id = "apiModal"; |
| 310 | apiModal.style.cssText = ` |
| 311 | position: fixed; top:0; left:0; width:100vw; height:100vh; |
| 312 | background: rgba(0,0,0,0.8); z-index: 4000; display:none; |
| 313 | align-items: center; justify-content: center; |
| 314 | `; |
| 315 | apiModal.innerHTML = ` |
| 316 | <div style="position:relative; width:90vw; height:90vh; background:#fff; border-radius:8px; overflow:hidden;"> |
| 317 | <div class="editor-close-btn" id="closeApiModal">×</div> |
| 318 | <iframe src="api.php" style="width:100%;height:100%;border:none;"></iframe> |
| 319 | </div> |
| 320 | `; |
| 321 | document.body.appendChild(apiModal); |
| 322 | |
| 323 | // wire up its close button |
| 324 | document.getElementById("closeApiModal").addEventListener("click", () => { |
| 325 | apiModal.style.display = "none"; |
| 326 | }); |
| 327 | } |
| 328 | // finally, show it |
| 329 | apiModal.style.display = "flex"; |
| 330 | } |
no outgoing calls
no test coverage detected