Move UI configs to profile (#2201)

* feat: add tabs

* feat: move buttons to user profile

* feat: i18n

* refactor: move ui methods to `account` component
This commit is contained in:
Vlad Stan
2024-01-15 11:51:34 +02:00
committed by GitHub
parent 031ce14857
commit 4cea06c5a5
7 changed files with 423 additions and 377 deletions
+16
View File
@@ -6,6 +6,7 @@ new Vue({
user: null,
hasUsername: false,
showUserId: false,
tab: 'user',
passwordData: {
show: false,
oldPassword: null,
@@ -15,6 +16,21 @@ new Vue({
}
},
methods: {
activeLanguage: function (lang) {
return window.i18n.locale === lang
},
changeLanguage: function (newValue) {
window.i18n.locale = newValue
this.$q.localStorage.set('lnbits.lang', newValue)
},
toggleDarkMode: function () {
this.$q.dark.toggle()
this.$q.localStorage.set('lnbits.darkMode', this.$q.dark.isActive)
},
changeColor: function (newValue) {
document.body.setAttribute('data-theme', newValue)
this.$q.localStorage.set('lnbits.theme', newValue)
},
updateAccount: async function () {
try {
const {data} = await LNbits.api.request(