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) <noreply@anthropic.com>
This commit is contained in:
parent
2339946e6a
commit
58459b0204
@ -634,6 +634,11 @@
|
|||||||
const data = await resp.json();
|
const data = await resp.json();
|
||||||
if (data.cert_base64url) {
|
if (data.cert_base64url) {
|
||||||
lndConnInfo = data;
|
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) {
|
try { updateConnInfo(); } catch(ue) {
|
||||||
document.getElementById('lndQrBox').innerHTML = '<div style="color:#f87171;font-size:11px;text-align:center;padding:1rem">Update error: ' + ue.message + '</div>';
|
document.getElementById('lndQrBox').innerHTML = '<div style="color:#f87171;font-size:11px;text-align:center;padding:1rem">Update error: ' + ue.message + '</div>';
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user