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: [],
walletEventListeners: [],
updatePayments: false,
updatePaymentsHash: ''
updatePaymentsHash: '',
walletFlip: Quasar.LocalStorage.getItem('lnbits.walletFlip') ?? false
})

View file

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

View file

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

View file

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