refactor: use mobileSimple reactive value (#3518)

This commit is contained in:
dni ⚡
2025-11-13 13:17:27 +01:00
committed by GitHub
parent 28c4235c94
commit 00eaec8290
12 changed files with 67 additions and 59 deletions
@@ -29,6 +29,14 @@ window.app.component('lnbits-theme', {
document.body.classList.remove('gradient-bg')
}
},
'g.mobileSimple'(val) {
this.$q.localStorage.set('lnbits.mobileSimple', val)
if (val === true) {
document.body.classList.add('mobile-simple')
} else {
document.body.classList.remove('mobile-simple')
}
},
'g.bgimageChoice'(val) {
this.$q.localStorage.set('lnbits.backgroundImage', val)
if (val === '') {
@@ -102,6 +110,9 @@ window.app.component('lnbits-theme', {
`url(${this.g.bgimageChoice})`
)
}
if (this.g.mobileSimple === true) {
document.body.classList.add('mobile-simple')
}
this.checkUrlParams()
}
})