From f526a93b6c83cd86b63f44c2f03da5860fced916 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Tue, 12 Sep 2023 12:51:56 +0100 Subject: [PATCH] make wallets name prettier! (#1918) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make wallets name prettier! * Update lnbits/core/templates/admin/index.html Co-authored-by: dni ⚡ * Update lnbits/core/templates/admin/index.html Co-authored-by: dni ⚡ --------- Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com> Co-authored-by: dni ⚡ --- lnbits/core/templates/admin/_tab_funding.html | 66 ++------ lnbits/core/templates/admin/index.html | 146 +++++------------- 2 files changed, 54 insertions(+), 158 deletions(-) diff --git a/lnbits/core/templates/admin/_tab_funding.html b/lnbits/core/templates/admin/_tab_funding.html index 9a154f5c5..48c5c4e47 100644 --- a/lnbits/core/templates/admin/_tab_funding.html +++ b/lnbits/core/templates/admin/_tab_funding.html @@ -31,13 +31,8 @@

Active Funding (Requires server restart)

- +
@@ -45,36 +40,20 @@

Invoice Expiry

- +

Fee reserve

- +
- +
@@ -85,30 +64,13 @@

Funding Sources (Requires server restart)

- - + + - - + + @@ -116,4 +78,4 @@
- + \ No newline at end of file diff --git a/lnbits/core/templates/admin/index.html b/lnbits/core/templates/admin/index.html index a41310a3f..f75a443d1 100644 --- a/lnbits/core/templates/admin/index.html +++ b/lnbits/core/templates/admin/index.html @@ -2,63 +2,26 @@ %} {% block page %}
- - {%raw%}{{ $t('save_tooltip') }}{%endraw%} + + {%raw%}{{ $t('save_tooltip') }}{%endraw%} - + - - {%raw%}{{ $t('restart_tooltip') }}{%endraw%} + + {%raw%}{{ $t('restart_tooltip') }}{%endraw%} - + - + {%raw%}{{ $t('add_funds_tooltip') }}{%endraw%} - + {%raw%}{{ $t('reset_defaults_tooltip') }}{%endraw%}
@@ -70,35 +33,15 @@
- + - + - + - + - +
@@ -122,43 +65,20 @@
- +
- +
- + - +
@@ -216,6 +136,21 @@ }, tab: 'funding', needsRestart: false, + prettyFunding: new Map([ + ["VoidWallet", "Void Wallet"], + ["FakeWallet", "Fake Wallet"], + ["CoreLightningWallet", "Core Lightning"], + ["CoreLightningRestWallet", "Core Lightning"], + ["LndRestWallet", "Lightning Network Daemon (LND Rest)"], + ["LndWallet", "Lightning Network Daemon (LND)"], + ["LnTipsWallet", "LN.Tips"], + ["LNPayWallet", "LN Pay"], + ["EclairWallet", "Eclair (ACINQ)"], + ["LNbitsWallet", "LNBits"], + ["OpenNodeWallet", "OpenNode"], + ["ClicheWallet", "Cliche (NBD)"], + ["SparkWallet", "Spark"] + ]), funding_sources: new Map([ ['VoidWallet', null], [ @@ -471,7 +406,7 @@ '/api/v1/ws/' + digestHex this.ws = new WebSocket(localUrl) - this.ws.addEventListener('message', async ({data}) => { + this.ws.addEventListener('message', async ({ data }) => { this.logs.push(data.toString()) const scrollArea = this.$refs.logScroll if (scrollArea) { @@ -610,7 +545,7 @@ .then(response => { this.isSuperUser = response.data.is_super_user || false this.settings = response.data - this.formData = {...this.settings} + this.formData = { ...this.settings } this.updateFundingData() this.getNotifications() }) @@ -633,17 +568,16 @@ .then(response => { this.needsRestart = this.settings.lnbits_backend_wallet_class !== - this.formData.lnbits_backend_wallet_class || + this.formData.lnbits_backend_wallet_class || this.settings.lnbits_killswitch !== - this.formData.lnbits_killswitch + this.formData.lnbits_killswitch this.settings = this.formData this.formData = _.clone(this.settings) this.updateFundingData() this.$q.notify({ type: 'positive', - message: `Success! Settings changed! ${ - this.needsRestart ? 'Restart required!' : '' - }`, + message: `Success! Settings changed! ${this.needsRestart ? 'Restart required!' : '' + }`, icon: null }) }) @@ -682,4 +616,4 @@ } }) -{% endblock %} +{% endblock %} \ No newline at end of file