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
// so the service worker reinitializes the cache
const CACHE_VERSION = 34
const CACHE_VERSION = 35
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => {

File diff suppressed because one or more lines are too long

View File

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

View File

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