diff --git a/lnbits/static/js/base.js b/lnbits/static/js/base.js
index 579db400..cd27e785 100644
--- a/lnbits/static/js/base.js
+++ b/lnbits/static/js/base.js
@@ -138,6 +138,7 @@ window.LNbits = {
user: function (data) {
var obj = {
id: data.id,
+ admin: data.admin,
email: data.email,
extensions: data.extensions,
wallets: data.wallets
@@ -326,6 +327,12 @@ window.windowMixin = {
}
},
+ computed: {
+ isAdminUser: function () {
+ return this.g.user?.admin
+ }
+ },
+
methods: {
changeColor: function (newValue) {
document.body.setAttribute('data-theme', newValue)
@@ -335,6 +342,9 @@ window.windowMixin = {
this.$q.dark.toggle()
this.$q.localStorage.set('lnbits.darkMode', this.$q.dark.isActive)
},
+ goToAdminConsole: function () {
+ window.location.href = '/admin?usr=' + this.g.user.id
+ },
copyText: function (text, message, position) {
var notify = this.$q.notify
Quasar.utils.copyToClipboard(text).then(function () {
diff --git a/lnbits/templates/base.html b/lnbits/templates/base.html
index ef270371..1a74fee7 100644
--- a/lnbits/templates/base.html
+++ b/lnbits/templates/base.html
@@ -163,6 +163,17 @@
>
Toggle Dark Mode
+
+ Admin Console
+