format and bundle

This commit is contained in:
Arc
2024-12-18 23:28:42 +00:00
parent fb5659de2a
commit 5997fd74fa
5 changed files with 58 additions and 57 deletions
+1 -1
View File
@@ -685,12 +685,12 @@ async def m029_create_audit_table(db: Connection):
""" """
) )
async def m030_add_currency_to_wallet(db: Connection): async def m030_add_currency_to_wallet(db: Connection):
""" """
Setting currency to default is heavy, so easier just to add a trigger. Setting currency to default is heavy, so easier just to add a trigger.
""" """
await db.execute( await db.execute(
""" """
CREATE TRIGGER IF NOT EXISTS set_default_currency CREATE TRIGGER IF NOT EXISTS set_default_currency
AFTER INSERT ON wallets AFTER INSERT ON wallets
+10 -15
View File
@@ -55,7 +55,7 @@
v-if="!isPrioritySwapped" v-if="!isPrioritySwapped"
style="height: 90px" style="height: 90px"
> >
<div class="col-7" > <div class="col-7">
<div class="row"> <div class="row">
<div class="col-auto"> <div class="col-auto">
<div class="text-h3 q-my-none text-no-wrap"> <div class="text-h3 q-my-none text-no-wrap">
@@ -100,9 +100,7 @@
v-if="update.currency" v-if="update.currency"
class="text-h3 q-my-none text-no-wrap" class="text-h3 q-my-none text-no-wrap"
> >
<strong <strong v-text="formattedFiatAmount"></strong>
v-text="formattedFiatAmount"
></strong>
</div> </div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
@@ -125,10 +123,11 @@
</div> </div>
</div> </div>
<div class="absolute-right q-pa-md" v-if="$q.screen.gt.md && update.currency"> <div
<div class="text-bold text-italic"> class="absolute-right q-pa-md"
BTC Price v-if="$q.screen.gt.md && update.currency"
</div> >
<div class="text-bold text-italic">BTC Price</div>
<span <span
class="text-bold text-italic" class="text-bold text-italic"
v-text="formattedExchange" v-text="formattedExchange"
@@ -150,7 +149,6 @@
</div> </div>
</q-card-section> </q-card-section>
<div class="row q-pb-md q-px-md q-col-gutter-md gt-sm"> <div class="row q-pb-md q-px-md q-col-gutter-md gt-sm">
<div class="col"> <div class="col">
<q-btn <q-btn
unelevated unelevated
@@ -166,11 +164,7 @@
@click="showReceiveDialog" @click="showReceiveDialog"
:label="$t('create_invoice')" :label="$t('create_invoice')"
></q-btn> ></q-btn>
<q-btn <q-btn unelevated color="secondary" icon="qr_code_scanner">
unelevated
color="secondary"
icon="qr_code_scanner"
>
<q-tooltip <q-tooltip
><span v-text="$t('camera_tooltip')"></span ><span v-text="$t('camera_tooltip')"></span
></q-tooltip> ></q-tooltip>
@@ -181,7 +175,8 @@
:callback="updateBalanceCallback" :callback="updateBalanceCallback"
:small_btn="false" :small_btn="false"
></lnbits-update-balance> ></lnbits-update-balance>
</div></div> </div>
</div>
</q-card> </q-card>
<q-card <q-card
File diff suppressed because one or more lines are too long
+7 -8
View File
@@ -678,10 +678,7 @@ window.app = Vue.createApp({
handleFiatTracking() { handleFiatTracking() {
if (this.fiatTracking === false) { if (this.fiatTracking === false) {
this.update.currency = '' this.update.currency = ''
this.$q.localStorage.setItem( this.$q.localStorage.setItem('lnbits.isPrioritySwapped', false)
'lnbits.isPrioritySwapped',
false
)
this.$q.localStorage.remove(`lnbits.exchangeRate`) this.$q.localStorage.remove(`lnbits.exchangeRate`)
} }
} }
@@ -700,7 +697,7 @@ window.app = Vue.createApp({
setTimeout(() => { setTimeout(() => {
this.ignoreWatcher = false this.ignoreWatcher = false
}, 3000) }, 3000)
if(this.g.wallet.currency){ if (this.g.wallet.currency) {
this.fiatTracking = true this.fiatTracking = true
this.updateFiatBalance(this.g.wallet.currency) this.updateFiatBalance(this.g.wallet.currency)
} }
@@ -718,7 +715,7 @@ window.app = Vue.createApp({
}, },
'update.currency'(newValue) { 'update.currency'(newValue) {
if (this.ignoreWatcher) return if (this.ignoreWatcher) return
this.updateWallet({ currency: newValue }) this.updateWallet({currency: newValue})
this.updateFiatBalance(newValue) this.updateFiatBalance(newValue)
} }
}, },
@@ -729,8 +726,10 @@ window.app = Vue.createApp({
this.$q.localStorage.set('lnbits.disclaimerShown', true) this.$q.localStorage.set('lnbits.disclaimerShown', true)
} }
// check blanace priority // check blanace priority
if (this.$q.localStorage.getItem('lnbits.isPrioritySwapped')){ if (this.$q.localStorage.getItem('lnbits.isPrioritySwapped')) {
this.isPrioritySwapped = this.$q.localStorage.getItem('lnbits.isPrioritySwapped') this.isPrioritySwapped = this.$q.localStorage.getItem(
'lnbits.isPrioritySwapped'
)
} else { } else {
this.isPrioritySwapped = false this.isPrioritySwapped = false
this.$q.localStorage.setItem('lnbits.isPrioritySwapped', false) this.$q.localStorage.setItem('lnbits.isPrioritySwapped', false)
+8 -1
View File
@@ -506,7 +506,14 @@
</template> </template>
<template id="lnbits-update-balance"> <template id="lnbits-update-balance">
<q-btn v-if="admin && small_btn" flat round color="primary" size="sm" icon="add"> <q-btn
v-if="admin && small_btn"
flat
round
color="primary"
size="sm"
icon="add"
>
<q-popup-edit class="bg-accent text-white" v-slot="scope" v-model="credit"> <q-popup-edit class="bg-accent text-white" v-slot="scope" v-model="credit">
<q-input <q-input
filled filled