Skip to content

Commit 462ae99

Browse files
Added lnpro.xyz link to admin dashboard
1 parent 6026eab commit 462ae99

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
outputs = { self, nixpkgs, raspberry-pi-nix, lnbits, spark-sidecar, ... }:
2323
let
24-
version = "0.1.46"; # Bump before each release tag to match the next tag name
24+
version = "0.1.47"; # Bump before each release tag to match the next tag name
2525
system = "aarch64-linux";
2626
in
2727
{

nixos/admin-app/static/js/dashboard-tunnel.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,19 @@
169169
D.updateTunnelAlertStatus(hasTunnel, current.expires_at);
170170
D.maybeNotifyTunnelExpiry(current);
171171

172+
// set https://lnpro.xyz/?id=[session-key] if there is a session key on tunnel-account-link
173+
if(D.el('tunnel-account-link')) {
174+
if(data.client_id) {
175+
const url = 'https://lnpro.xyz/?id=' + encodeURIComponent(data.client_id);
176+
D.el('tunnel-account-link').textContent = url;
177+
D.el('tunnel-account-link').href = url;
178+
D.el('tunnel-account-link').rel = 'noopener noreferrer';
179+
D.el('tunnel-account-link').target = '_blank';
180+
} else {
181+
D.el('tunnel-account-link').textContent = '--';
182+
D.el('tunnel-account-link').href = '#';
183+
}
184+
}
172185
if (D.el('tunnel-client-id')) D.el('tunnel-client-id').textContent = data.client_id || '--';
173186
if (D.el('tunnel-remote-port')) D.el('tunnel-remote-port').textContent = current.remote_port || '--';
174187
if (D.el('tunnel-expires-at')) D.el('tunnel-expires-at').textContent = D.formatTunnelDate(current.expires_at);

nixos/admin-app/templates/partials/cards/tunnel.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
Pay Invoice
4646
</button>
4747
</div>
48+
</div>
49+
<div>
4850
<a href="#" id="tunnel-more-btn" class="inline-block text-ln-muted hover:text-ln-pink text-xs font-mono uppercase transition-colors">
4951
More
5052
</a>
@@ -53,6 +55,10 @@
5355
<div id="tunnel-details" class="hidden mt-4 border border-ln-border rounded-lg p-3 bg-ln-surface/40">
5456
<div class="text-ln-muted text-xs font-mono uppercase tracking-wider mb-2">Details</div>
5557
<div class="space-y-2 text-sm font-mono">
58+
<div class="flex items-center gap-2">
59+
<div class="text-ln-muted">LNPro.xyz account:</div>
60+
<a class="text-ln-pink break-all" id="tunnel-account-link">--</span>
61+
</div>
5662
<div><span class="text-ln-muted">Session key:</span> <span class="text-ln-text" id="tunnel-client-id">--</span></div>
5763
<div><span class="text-ln-muted">Port:</span> <span id="tunnel-remote-port">--</span></div>
5864
<div>

0 commit comments

Comments
 (0)