fix software uninstall in modern ui

Signed-off-by: si458 <simonsmith5521@gmail.com>

si458 committed May 17, 2026 at 11:44 UTC ddd3f86b744089f8af236120b9e333ff8ed461bd
1 file changed +6 -4
views/default3.handlebars
+6 -4
@@ -14244,12 +14244,13 @@
14244 dialogContent += '<div style="background-color:#f5f5f5;padding:10px;border-radius:5px;word-break:break-all;font-family:monospace;font-size:11px;max-height:80px;overflow-y:auto">' + EscapeHtml(cmd) + '</div>';
14245 dialogContent += '<p style="margin-top:10px"><i>' + "Silent uninstall will be performed" + '</i></p>';
14246 dialogContent += '</div>';
14247 - setDialogMode(2, "Uninstall Software", 3, function() {
14247 + setModalContent('xxAddAgent', "Uninstall Software", dialogContent);
14248 + showModal('xxAddAgentModal', 'idx_dlgOkButton', function() {
14249 QH('p18Status', '<span style="color:blue">' + "Uninstalling..." + '</span>');
14250 var base64Cmd = btoa(unescape(encodeURIComponent(cmd))); //Use Base64 encoding to avoid special character problems.
14251 meshserver.send({ action: 'msg', type: 'software', nodeid: currentNode._id, value: 'uninstallapp ' + base64Cmd });
14252 setTimeout(function() { QH('p18Status', "Uninstall started. Click Refresh to update"); }, 2000);
14252 - }, dialogContent);
14253 + });
14254 }
14255
14256 function uninstallStoreApp(encodedCmd) {
@@ -14260,11 +14261,12 @@
14261 dialogContent += '<p><b>' + "Remove this Store app?" + '</b></p>';
14262 dialogContent += '<div style="background-color:#f5f5f5;padding:10px;border-radius:5px;word-break:break-all;font-family:monospace;font-size:11px">' + EscapeHtml(cmd) + '</div>';
14263 dialogContent += '</div>';
14263 - setDialogMode(2, "Remove Store App", 3, function() {
14264 + setModalContent('xxAddAgent', "Remove Store App", dialogContent);
14265 + showModal('xxAddAgentModal', 'idx_dlgOkButton', function() {
14266 QH('p18Status', '<span style="color:blue">' + "Removing..." + '</span>');
14267 meshserver.send({ action: 'msg', type: 'software', nodeid: currentNode._id, value: 'uninstallstoreapp "' + cmd.replace(/"/g, '\\"') + '"' });
14268 setTimeout(function() { QH('p18Status', "Remove command sent. Click Refresh to update"); }, 2000);
14267 - }, dialogContent);
14269 + });
14270 }
14271
14272 function handleUninstallResponse(data) {