From 19273e6d103145973a0ed33bc33da827795c6a48 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 16:10:48 +0000 Subject: [PATCH] refactor: simplify modal handler wiring for rerender safety Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/15310f2a-9bf2-4813-b2be-7462cb923c9c Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/static/js/features.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/sovran_systemsos_web/static/js/features.js b/app/sovran_systemsos_web/static/js/features.js index 924db20..afe6547 100644 --- a/app/sovran_systemsos_web/static/js/features.js +++ b/app/sovran_systemsos_web/static/js/features.js @@ -222,13 +222,13 @@ function openPortRequirementsModal(featureName, ports, onContinue) { var continueBtn = onContinue ? '' : ''; - var rows = ports.map(function(p) { - return '' + escHtml(p.port) + '' + - '' + escHtml(p.protocol) + '' + - '' + escHtml(p.description) + ''; - }).join(""); function renderPortRequirements(internalIp) { + var rows = ports.map(function(p) { + return '' + escHtml(p.port) + '' + + '' + escHtml(p.protocol) + '' + + '' + escHtml(p.description) + ''; + }).join(""); var ipLine = internalIp ? '

Forward each port below to this machine\'s internal IP: ' + escHtml(internalIp) + '

' : "

Forward each port below to this machine's internal LAN IP in your router's port forwarding settings.

"; @@ -251,15 +251,15 @@ function openPortRequirementsModal(featureName, ports, onContinue) { continueBtn + ''; - document.getElementById("port-req-dismiss-btn").addEventListener("click", function() { + document.getElementById("port-req-dismiss-btn").onclick = function() { closePortRequirementsModal(); - }); + }; if (onContinue) { - document.getElementById("port-req-continue-btn").addEventListener("click", function() { + document.getElementById("port-req-continue-btn").onclick = function() { closePortRequirementsModal(); onContinue(); - }); + }; } }