From 51b0f89fd18b61d2f94a2d91e2876863cba72cd7 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Sat, 5 Jan 2019 18:10:05 +0000 Subject: [PATCH] REF: better channels display --- controllers/website.js | 7 ++++++- templates/index.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/website.js b/controllers/website.js index f06ef7c..5e31652 100644 --- a/controllers/website.js +++ b/controllers/website.js @@ -32,7 +32,11 @@ function updateLightning() { channel.ascii += ']'; channel.capacity_btc = channel.capacity / 100000000; channel.name = pubkey2name[channel.remote_pubkey]; - channels.push(channel); + if (channel.name) { + channels.unshift(channel); + } else { + channels.push(channel); + } } lightningListChannels.channels = channels; }); @@ -51,6 +55,7 @@ const pubkey2name = { '0279c22ed7a068d10dc1a38ae66d2d6461e269226c60258c021b1ddcdfe4b00bc4': 'ln1.satoshilabs.com', '02c91d6aa51aa940608b497b6beebcb1aec05be3c47704b682b3889424679ca490': 'lnd-21.LNBIG.com', '024655b768ef40951b20053a5c4b951606d4d86085d51238f2c67c7dec29c792ca': 'satoshis.place', + '03c2abfa93eacec04721c019644584424aab2ba4dff3ac9bdab4e9c97007491dda': 'tippin.me', }; router.get('/', function(req, res) { diff --git a/templates/index.html b/templates/index.html index d80d4f0..cee388f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -52,7 +52,7 @@
{{ascii}}
{{capacity_btc}} BTC  
-
{{remote_pubkey}} {{name}}  
+
{{remote_pubkey}} {{name}} {{^active}}[INACTIVE]{{/active}}   
{{/channels}}