highlight active language #1730 (#1741)

This commit is contained in:
dni ⚡ 2023-06-01 12:33:53 +02:00 committed by GitHub
parent af660fec14
commit 8ed2422ade
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
// update cache version every time there is a new deployment // update cache version every time there is a new deployment
// so the service worker reinitializes the cache // so the service worker reinitializes the cache
const CACHE_VERSION = 34 const CACHE_VERSION = 35
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-` const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => { const getApiKey = request => {

File diff suppressed because one or more lines are too long

View File

@ -350,6 +350,9 @@ window.windowMixin = {
}, },
methods: { methods: {
activeLanguage: function (lang) {
return window.i18n.locale === lang
},
changeLanguage: function (newValue) { changeLanguage: function (newValue) {
window.i18n.locale = newValue window.i18n.locale = newValue
this.$q.localStorage.set('lnbits.lang', newValue) this.$q.localStorage.set('lnbits.lang', newValue)

View File

@ -82,6 +82,7 @@
<q-item <q-item
clickable clickable
v-close-popup v-close-popup
:active="activeLanguage(lang.value)"
@click="changeLanguage(lang.value)" @click="changeLanguage(lang.value)"
><q-item-section> ><q-item-section>
{% raw %} {% raw %}