theme saved and works
This commit is contained in:
@@ -307,7 +307,8 @@ window.windowMixin = {
|
||||
extensions: [],
|
||||
user: null,
|
||||
wallet: null,
|
||||
payments: []
|
||||
payments: [],
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -317,6 +318,7 @@ window.windowMixin = {
|
||||
document.body.setAttribute('data-theme', newValue)
|
||||
console.log(document.body.getAttribute('data-theme'))
|
||||
console.log(newValue)
|
||||
this.$q.localStorage.set('lnbits.theme', newValue)
|
||||
},
|
||||
toggleDarkMode: function () {
|
||||
this.$q.dark.toggle()
|
||||
@@ -334,6 +336,9 @@ window.windowMixin = {
|
||||
},
|
||||
created: function () {
|
||||
this.$q.dark.set(this.$q.localStorage.getItem('lnbits.darkMode'))
|
||||
if (this.$q.localStorage.getItem('lnbits.theme')){
|
||||
document.body.setAttribute('data-theme', this.$q.localStorage.getItem('lnbits.theme'))
|
||||
}
|
||||
if (window.user) {
|
||||
this.g.user = Object.freeze(window.LNbits.map.user(window.user))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user