[feat] persist user ui customization (#3743)
This commit is contained in:
@@ -9,6 +9,10 @@ window.app.component('lnbits-theme', {
|
||||
'g.disclaimerShown'(val) {
|
||||
this.$q.localStorage.setItem('lnbits.disclaimerShown', val)
|
||||
},
|
||||
'g.locale'(val) {
|
||||
this.$q.localStorage.setItem('lnbits.lang', val)
|
||||
window.i18n.global.locale = val
|
||||
},
|
||||
'g.isFiatPriority'(val) {
|
||||
this.$q.localStorage.setItem('lnbits.isFiatPriority', val)
|
||||
},
|
||||
@@ -123,6 +127,13 @@ window.app.component('lnbits-theme', {
|
||||
if (this.g.mobileSimple === true) {
|
||||
document.body.classList.add('mobile-simple')
|
||||
}
|
||||
Object.entries(this.g.user.uiCustomization || {}).forEach(
|
||||
([key, value]) => {
|
||||
if (key in this.g) {
|
||||
this.g[key] = value
|
||||
}
|
||||
}
|
||||
)
|
||||
this.checkUrlParams()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user