chore: code format html component files

This commit is contained in:
Vlad Stan 2022-07-25 11:53:57 +03:00
parent afbdfeff8c
commit 8376f08e8b
5 changed files with 78 additions and 47 deletions

View file

@ -7,7 +7,7 @@ format: prettier isort black
check: mypy checkprettier checkblack check: mypy checkprettier checkblack
prettier: $(shell find lnbits -name "*.js" -name ".html") prettier: $(shell find lnbits -name "*.js" -name ".html")
./node_modules/.bin/prettier --write lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js lnbits/extensions/*/static/components/*/*.js ./node_modules/.bin/prettier --write lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js lnbits/extensions/*/static/components/*/*.js lnbits/extensions/*/static/components/*/*.html
black: $(shell find lnbits -name "*.py") black: $(shell find lnbits -name "*.py")
./venv/bin/black lnbits ./venv/bin/black lnbits
@ -21,7 +21,7 @@ isort: $(shell find lnbits -name "*.py")
./venv/bin/isort --profile black lnbits ./venv/bin/isort --profile black lnbits
checkprettier: $(shell find lnbits -name "*.js" -name ".html") checkprettier: $(shell find lnbits -name "*.js" -name ".html")
./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js lnbits/extensions/*/static/components/*/*.js ./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js lnbits/extensions/*/static/components/*/*.js lnbits/extensions/*/static/components/*/*.html
checkblack: $(shell find lnbits -name "*.py") checkblack: $(shell find lnbits -name "*.py")
./venv/bin/black --check lnbits ./venv/bin/black --check lnbits

View file

@ -1,6 +1,5 @@
<div> <div>
<q-card> <q-card>
<div class="row items-center no-wrap q-mb-md"> <div class="row items-center no-wrap q-mb-md">
<div class="col-11"> <div class="col-11">
<div class="row justify-center q-gutter-x-md items-center"> <div class="row justify-center q-gutter-x-md items-center">
@ -8,7 +7,12 @@
</div> </div>
</div> </div>
<div class="col-1"> <div class="col-1">
<q-btn unelevated @click="config.show = true" color="primary" icon="settings"> <q-btn
unelevated
@click="config.show = true"
color="primary"
icon="settings"
>
</q-btn> </q-btn>
</div> </div>
</div> </div>
@ -17,22 +21,51 @@
<q-dialog v-model="config.show" position="top"> <q-dialog v-model="config.show" position="top">
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card"> <q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
<q-form @submit="updateConfig" class="q-gutter-md"> <q-form @submit="updateConfig" class="q-gutter-md">
<q-input filled dense v-model.trim="config.data.mempool_endpoint" type="text" label="Mempool Endpoint"> <q-input
filled
dense
v-model.trim="config.data.mempool_endpoint"
type="text"
label="Mempool Endpoint"
>
</q-input> </q-input>
<q-input filled dense v-model.number="config.data.receive_gap_limit" type="number" min="0" <q-input
label="Receive Gap Limit"></q-input> filled
dense
v-model.number="config.data.receive_gap_limit"
type="number"
min="0"
label="Receive Gap Limit"
></q-input>
<q-input filled dense v-model.number="config.data.change_gap_limit" type="number" min="0" <q-input
label="Change Gap Limit"></q-input> filled
dense
v-model.number="config.data.change_gap_limit"
type="number"
min="0"
label="Change Gap Limit"
></q-input>
<q-toggle :label="config.data.sats_denominated ? 'sats denominated' : 'BTC denominated'" <q-toggle
color="secodary" v-model="config.data.sats_denominated"></q-toggle> :label="config.data.sats_denominated ? 'sats denominated' : 'BTC denominated'"
color="secodary"
v-model="config.data.sats_denominated"
></q-toggle>
<div class="row q-mt-lg"> <div class="row q-mt-lg">
<q-btn unelevated color="primary" :disable=" <q-btn
!config.data.mempool_endpoint " type="submit">Update</q-btn> unelevated
<q-btn v-close-popup flat color="grey" class="q-ml-auto">Cancel</q-btn> color="primary"
:disable="
!config.data.mempool_endpoint "
type="submit"
>Update</q-btn
>
<q-btn v-close-popup flat color="grey" class="q-ml-auto"
>Cancel</q-btn
>
</div> </div>
</q-form> </q-form>
</q-card> </q-card>

View file

@ -1,5 +1,5 @@
<div> <div>
<q-card> <q-card>
<q-card-section> <q-card-section>
<div class="row items-center no-wrap q-mb-md"> <div class="row items-center no-wrap q-mb-md">
<div class="col"> <div class="col">
@ -185,5 +185,4 @@
</q-form> </q-form>
</q-card> </q-card>
</q-dialog> </q-dialog>
</div>
</div>

View file

@ -91,7 +91,6 @@ async function walletList(path) {
return obj.id === walletAccountId return obj.id === walletAccountId
}) })
await this.refreshWalletAccounts() await this.refreshWalletAccounts()
} catch (error) { } catch (error) {
this.$q.notify({ this.$q.notify({
type: 'warning', type: 'warning',