mirror of
https://github.com/lnbits/lnbits.git
synced 2025-04-09 04:18:11 +02:00
feat: add Admin Console icon
This commit is contained in:
parent
b5a39e32c3
commit
84a24c389f
@ -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 () {
|
||||
|
@ -163,6 +163,17 @@
|
||||
>
|
||||
<q-tooltip>Toggle Dark Mode</q-tooltip>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="isAdminUser"
|
||||
dense
|
||||
flat
|
||||
round
|
||||
@click="goToAdminConsole"
|
||||
icon="admin_panel_settings"
|
||||
size="sm"
|
||||
>
|
||||
<q-tooltip>Admin Console</q-tooltip>
|
||||
</q-btn>
|
||||
</q-toolbar>
|
||||
</q-header>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user