Skip to content

Agent Zero AI framework

Add tunnel handling in settings

linuztx2c37b05381a0
diff --git a/webui/js/settings.js b/webui/js/settings.js
index 6c01737d7..5d9e3fb3d 100644
--- a/webui/js/settings.js
+++ b/webui/js/settings.js
@@ -66,6 +66,19 @@ const settingsModalProxy = {
}
}
}
+
+ // When switching to the tunnel tab, initialize tunnelSettings
+ if (tabName === 'tunnel') {
+ console.log('Switching to tunnel tab, initializing tunnelSettings');
+ const tunnelElement = document.querySelector('[x-data="tunnelSettings"]');
+ if (tunnelElement) {
+ const tunnelData = Alpine.$data(tunnelElement);
+ if (tunnelData && typeof tunnelData.checkTunnelStatus === 'function') {
+ // Check tunnel status
+ tunnelData.checkTunnelStatus();
+ }
+ }
+ }
}, 10);
},