From 0db0457f841b6231bcdb0bb9e3242fe4ba62d4a1 Mon Sep 17 00:00:00 2001 From: andersonid Date: Thu, 2 Oct 2025 08:29:15 -0300 Subject: [PATCH] Fix: implement missing showModal function --- app/static/index.html | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/app/static/index.html b/app/static/index.html index e744d94..1b0911b 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -2287,6 +2287,38 @@ ${rec.vpa_yaml} }; } + function showModal(content) { + // Remove existing modals + closeModal(); + + // Create modal element + const modal = document.createElement('div'); + modal.className = 'modal'; + modal.style.cssText = ` + display: block; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.5); + `; + + modal.innerHTML = content; + document.body.appendChild(modal); + + // Add close functionality + const closeBtn = modal.querySelector('.close'); + if (closeBtn) { + closeBtn.onclick = () => modal.remove(); + } + + modal.onclick = (e) => { + if (e.target === modal) modal.remove(); + }; + } + function closeModal() { const modals = document.querySelectorAll('.modal'); modals.forEach(modal => modal.remove());