fix: wallet was not flipping (#3508)

This commit is contained in:
dni ⚡ 2025-11-12 09:54:54 +01:00 committed by GitHub
parent 9ffc63b5dc
commit 783efb19db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 11 deletions

File diff suppressed because one or more lines are too long

View file

@ -42,5 +42,6 @@ window.g = Vue.reactive({
langs: [], langs: [],
walletEventListeners: [], walletEventListeners: [],
updatePayments: false, updatePayments: false,
updatePaymentsHash: '' updatePaymentsHash: '',
walletFlip: Quasar.LocalStorage.getItem('lnbits.walletFlip') ?? false
}) })

View file

@ -5,7 +5,6 @@ window.windowMixin = {
g: window.g, g: window.g,
toggleSubs: true, toggleSubs: true,
mobileSimple: true, mobileSimple: true,
walletFlip: true,
addWalletDialog: {show: false, walletType: 'lightning'}, addWalletDialog: {show: false, walletType: 'lightning'},
walletTypes: [{label: 'Lightning Wallet', value: 'lightning'}], walletTypes: [{label: 'Lightning Wallet', value: 'lightning'}],
isUserAuthorized: false, isUserAuthorized: false,
@ -36,11 +35,11 @@ window.windowMixin = {
methods: { methods: {
flipWallets(smallScreen) { flipWallets(smallScreen) {
this.walletFlip = !this.walletFlip this.g.walletFlip = !this.g.walletFlip
if (this.walletFlip && smallScreen) { if (this.g.walletFlip && smallScreen) {
this.g.visibleDrawer = false this.g.visibleDrawer = false
} }
this.$q.localStorage.set('lnbits.walletFlip', this.walletFlip) this.$q.localStorage.set('lnbits.walletFlip', this.g.walletFlip)
}, },
goToWallets() { goToWallets() {
this.$router.push({ this.$router.push({
@ -332,7 +331,6 @@ window.windowMixin = {
} }
await this.checkUsrInUrl() await this.checkUsrInUrl()
this.themeParams() this.themeParams()
this.walletFlip = this.$q.localStorage.getItem('lnbits.walletFlip')
if ( if (
this.$q.screen.gt.sm || this.$q.screen.gt.sm ||
this.$q.localStorage.getItem('lnbits.mobileSimple') == false this.$q.localStorage.getItem('lnbits.mobileSimple') == false

View file

@ -40,7 +40,7 @@
<q-page-container> <q-page-container>
<q-page class="q-px-md q-py-lg" :class="{'q-px-lg': $q.screen.gt.xs}"> <q-page class="q-px-md q-py-lg" :class="{'q-px-lg': $q.screen.gt.xs}">
<q-scroll-area <q-scroll-area
v-if="g.user && walletFlip" v-if="g.user && g.walletFlip"
style=" style="
height: 130px; height: 130px;
width: 100%; width: 100%;

View file

@ -19,21 +19,21 @@
<q-item-section side> <q-item-section side>
<q-btn <q-btn
flat flat
:icon="walletFlip ? 'view_list' : 'view_column'" :icon="g.walletFlip ? 'view_list' : 'view_column'"
color="grey" color="grey"
class="" class=""
@click="flipWallets($q.screen.lt.md)" @click="flipWallets($q.screen.lt.md)"
> >
<q-tooltip <q-tooltip
><span ><span
v-text="walletFlip ? $t('view_list') : $t('view_column')" v-text="g.walletFlip ? $t('view_list') : $t('view_column')"
></span ></span
></q-tooltip> ></q-tooltip>
</q-btn> </q-btn>
</q-item-section> </q-item-section>
</q-item> </q-item>
<lnbits-wallet-list <lnbits-wallet-list
v-if="!walletFlip" v-if="!g.walletFlip"
:balance="balance" :balance="balance"
@wallet-action="handleWalletAction" @wallet-action="handleWalletAction"
></lnbits-wallet-list> ></lnbits-wallet-list>