From 58459b0204a5f3314fc21afc6431bd7d8584e7a3 Mon Sep 17 00:00:00 2001 From: Dorian Date: Mon, 16 Mar 2026 16:29:26 +0000 Subject: [PATCH] fix: LND UI auto-select local mode when Tor unavailable When tor_onion is null in the connect info response, automatically switch dropdown to "REST (Local Network)" and show a helpful message instead of "Tor not configured for LND" error. Co-Authored-By: Claude Opus 4.6 (1M context) --- docker/lnd-ui/index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/lnd-ui/index.html b/docker/lnd-ui/index.html index 90f0a176..c807e705 100644 --- a/docker/lnd-ui/index.html +++ b/docker/lnd-ui/index.html @@ -634,6 +634,11 @@ const data = await resp.json(); if (data.cert_base64url) { lndConnInfo = data; + // Auto-select local mode when Tor is not available + if (!data.tor_onion) { + document.getElementById('connMode').value = 'rest-local'; + document.getElementById('connSubtitle').textContent = 'Tor hidden service not available. Use Local Network mode.'; + } try { updateConnInfo(); } catch(ue) { document.getElementById('lndQrBox').innerHTML = '
Update error: ' + ue.message + '
'; return;