diff --git a/docker/electrs-ui/index.html b/docker/electrs-ui/index.html index 2971c2dc..09463362 100644 --- a/docker/electrs-ui/index.html +++ b/docker/electrs-ui/index.html @@ -346,25 +346,11 @@ } } - async function fetchTorInfo() { - try { - var resp = await fetch('/rpc/v1', { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - credentials: 'include', - body: JSON.stringify({ method: 'tor.list-services', params: {} }) - }); - var data = await resp.json(); - if (data.result && data.result.services) { - var svc = data.result.services.find(function(s) { - return s.name === 'electrumx' || s.name === 'electrs' || s.local_port === 50001; - }); - if (svc && svc.onion_address) { - torOnion = svc.onion_address; - updateConnectionInfo(); - } - } - } catch(e) {} + function applyTorOnion(onion) { + if (onion) { + torOnion = onion; + updateConnectionInfo(); + } } async function updateStatus() { @@ -372,6 +358,11 @@ var resp = await fetch('electrs-status'); var data = await resp.json(); + // Extract Tor onion from status response + if (data.tor_onion && !torOnion) { + applyTorOnion(data.tor_onion); + } + var indexedH = data.indexed_height || 0; var networkH = data.network_height || 0; var pct = data.progress_pct || 0; @@ -426,7 +417,6 @@ updateStatus(); updateConnectionInfo(); - fetchTorInfo(); setInterval(updateStatus, 5000); diff --git a/docker/lnd-ui/Dockerfile b/docker/lnd-ui/Dockerfile index f91eaa5b..64b64dfb 100644 --- a/docker/lnd-ui/Dockerfile +++ b/docker/lnd-ui/Dockerfile @@ -2,6 +2,8 @@ FROM docker.io/library/nginx:alpine # Copy the HTML file COPY index.html /usr/share/nginx/html/ +COPY tailwind.css /usr/share/nginx/html/ +COPY qrcode.js /usr/share/nginx/html/ # Create directories for assets RUN mkdir -p /usr/share/nginx/html/assets/img/app-icons && \ @@ -10,6 +12,7 @@ RUN mkdir -p /usr/share/nginx/html/assets/img/app-icons && \ # Copy assets COPY lnd.svg /usr/share/nginx/html/assets/img/app-icons/ COPY bg-web5.jpg /usr/share/nginx/html/assets/img/ +COPY bg-intro.jpg /usr/share/nginx/html/assets/img/ # Copy nginx config COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/docker/lnd-ui/index.html b/docker/lnd-ui/index.html index e9308103..215aa350 100644 --- a/docker/lnd-ui/index.html +++ b/docker/lnd-ui/index.html @@ -4,7 +4,7 @@ LND - Archipelago - +