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
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")
./venv/bin/black lnbits
@ -21,7 +21,7 @@ isort: $(shell find lnbits -name "*.py")
./venv/bin/isort --profile black lnbits
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")
./venv/bin/black --check lnbits

View File

@ -1,5 +1,5 @@
<div class="checkbox-wrapper" @click="check">
<div :class="{ checkbox: true, checked: checked }"></div>
<div class="title">{{ title }}</div>
<q-btn color="primary">XXX</q-btn>
</div>
<div :class="{ checkbox: true, checked: checked }"></div>
<div class="title">{{ title }}</div>
<q-btn color="primary">XXX</q-btn>
</div>

View File

@ -1,40 +1,73 @@
<div>
<q-card>
<div class="row items-center no-wrap q-mb-md">
<div class="col-11">
<div class="row justify-center q-gutter-x-md items-center">
<div class="text-h3 q-pa-sm">{{satBtc(total)}}</div>
</div>
</div>
<div class="col-1">
<q-btn unelevated @click="config.show = true" color="primary" icon="settings">
</q-btn>
</div>
<q-card>
<div class="row items-center no-wrap q-mb-md">
<div class="col-11">
<div class="row justify-center q-gutter-x-md items-center">
<div class="text-h3 q-pa-sm">{{satBtc(total)}}</div>
</div>
</div>
<div class="col-1">
<q-btn
unelevated
@click="config.show = true"
color="primary"
icon="settings"
>
</q-btn>
</div>
</div>
</q-card>
<q-dialog v-model="config.show" position="top">
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
<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>
<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"
label="Change Gap Limit"
></q-input>
<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">
<q-btn
unelevated
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>
</q-form>
</q-card>
<q-dialog v-model="config.show" position="top">
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
<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>
<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"
label="Change Gap Limit"></q-input>
<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">
<q-btn unelevated 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>
</q-form>
</q-card>
</q-dialog>
</div>
</q-dialog>
</div>

View File

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

View File

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