From befb2889008f1d3291d77792271d3f50cafbbaf3 Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Fri, 21 Jul 2023 08:50:18 +0100 Subject: [PATCH] Fix admin notifications (#1803) * fix save badge being on all the time * make deep copy and add restart to notification popup --- lnbits/core/templates/admin/_tab_funding.html | 3 ++- lnbits/core/templates/admin/index.html | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lnbits/core/templates/admin/_tab_funding.html b/lnbits/core/templates/admin/_tab_funding.html index 6ceefc82d..9a154f5c5 100644 --- a/lnbits/core/templates/admin/_tab_funding.html +++ b/lnbits/core/templates/admin/_tab_funding.html @@ -47,7 +47,8 @@

Invoice Expiry

diff --git a/lnbits/core/templates/admin/index.html b/lnbits/core/templates/admin/index.html index 2943731a2..48c7c95d8 100644 --- a/lnbits/core/templates/admin/index.html +++ b/lnbits/core/templates/admin/index.html @@ -376,7 +376,7 @@ ]) } }, - created: function () { + created() { this.getSettings() this.getAudit() this.balance = +'{{ balance|safe }}' @@ -593,7 +593,7 @@ .then(response => { this.isSuperUser = response.data.is_super_user || false this.settings = response.data - this.formData = _.clone(this.settings) + this.formData = {...this.settings} this.updateFundingData() this.getNotifications() }) @@ -624,7 +624,9 @@ this.updateFundingData() this.$q.notify({ type: 'positive', - message: 'Success! Settings changed!', + message: `Success! Settings changed! ${ + this.needsRestart ? 'Restart required!' : '' + }`, icon: null }) })