feat: make the panels responsive
This commit is contained in:
parent
80e1545920
commit
05bc887ad5
|
@ -1,12 +1,12 @@
|
||||||
{% extends "public.html" %} {% block page %}
|
{% extends "public.html" %} {% block page %}
|
||||||
<div class="row items-center q-mt-md">
|
<div class="row items-center q-mt-md">
|
||||||
<div class="col-lg-4 col-md-2 col-sm-1"></div>
|
<div class="col-lg-4 col-md-3 col-sm-1"></div>
|
||||||
<div class="col-lg-4 col-md-8 col-sm-10">
|
<div class="col-lg-4 col-md-6 col-sm-10">
|
||||||
<q-card class="my-card">
|
<q-card>
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<center>
|
<center>
|
||||||
<div class="col theHeading">
|
<div class="col">
|
||||||
<span v-text="charge.description"></span>
|
<span class="text-h4" v-text="charge.description"></span>
|
||||||
</div>
|
</div>
|
||||||
</center>
|
</center>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
@ -66,8 +66,14 @@
|
||||||
<div class="row items-center">
|
<div class="row items-center">
|
||||||
<div class="col-4 q-pr-lg">Amount due:</div>
|
<div class="col-4 q-pr-lg">Amount due:</div>
|
||||||
<div class="col-8 q-pr-lg">
|
<div class="col-8 q-pr-lg">
|
||||||
<span v-if="charge.amount - charge.balance > 0" v-text="charge.amount - charge.balance">sats</span>
|
<span
|
||||||
<q-badge v-if="charge.amount - charge.balance <= 0" color="green"> none</q-badge>
|
v-if="charge.amount - charge.balance > 0"
|
||||||
|
v-text="charge.amount - charge.balance"
|
||||||
|
>sats</span
|
||||||
|
>
|
||||||
|
<q-badge v-if="charge.amount - charge.balance <= 0" color="green">
|
||||||
|
none</q-badge
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -122,9 +128,12 @@
|
||||||
<q-separator></q-separator>
|
<q-separator></q-separator>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</q-card>
|
||||||
<q-card class="q-pa-lg" v-if="lnbtc">
|
<q-card class="q-pa-lg" v-if="lnbtc">
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<div class="text-center q-pt-md">
|
<div class="row items-center q-mt-md">
|
||||||
|
<div class="col-md-2 col-sm-0"></div>
|
||||||
|
<div class="col-md-8 col-sm-12">
|
||||||
<div v-if="timetoComplete < 1 && !charge.paid">
|
<div v-if="timetoComplete < 1 && !charge.paid">
|
||||||
<q-icon
|
<q-icon
|
||||||
name="block"
|
name="block"
|
||||||
|
@ -169,6 +178,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2 col-sm-0"></div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
<q-card class="q-pa-lg" v-if="onbtc">
|
<q-card class="q-pa-lg" v-if="onbtc">
|
||||||
|
@ -221,24 +232,12 @@
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-card>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg- 4 col-md-2 col-sm-1" ></div>
|
<div class="col-lg- 4 col-md-3 col-sm-1"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %} {% block scripts %}
|
{% endblock %} {% block scripts %}
|
||||||
|
|
||||||
<style>
|
|
||||||
/* .theCard {
|
|
||||||
width: 30%;
|
|
||||||
margin: 10px auto;
|
|
||||||
} */
|
|
||||||
.theHeading {
|
|
||||||
margin: 15px;
|
|
||||||
font-size: 25px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<!-- todo: use config mempool -->
|
|
||||||
<script src="https://mempool.space/mempool.js"></script>
|
<script src="https://mempool.space/mempool.js"></script>
|
||||||
<script src="{{ url_for('satspay_static', path='js/utils.js') }}"></script>
|
<script src="{{ url_for('satspay_static', path='js/utils.js') }}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -266,7 +265,7 @@
|
||||||
methods: {
|
methods: {
|
||||||
startPaymentNotifier() {
|
startPaymentNotifier() {
|
||||||
this.cancelListener()
|
this.cancelListener()
|
||||||
|
if (!this.lnbitswallet) return
|
||||||
this.cancelListener = LNbits.events.onInvoicePaid(
|
this.cancelListener = LNbits.events.onInvoicePaid(
|
||||||
this.wallet,
|
this.wallet,
|
||||||
payment => {
|
payment => {
|
||||||
|
@ -303,9 +302,8 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
const utxos = await retryWithDelay(fn)
|
const utxos = await retryWithDelay(fn)
|
||||||
console.log('### utxos', utxos)
|
const balance = utxos.reduce((t, u) => t + u.value, 0)
|
||||||
this.charge.balance = utxos.reduce((t, u) => t + u.value, 0)
|
|
||||||
console.log('### utxos', utxos)
|
|
||||||
},
|
},
|
||||||
checkBalances: async function () {
|
checkBalances: async function () {
|
||||||
if (this.charge.lnbitswallet) this.checkInvoiceBalance()
|
if (this.charge.lnbitswallet) this.checkInvoiceBalance()
|
||||||
|
@ -368,7 +366,6 @@
|
||||||
const res = JSON.parse(data.toString())
|
const res = JSON.parse(data.toString())
|
||||||
console.log('### socker mempool res', res)
|
console.log('### socker mempool res', res)
|
||||||
if (res['address-transactions']) {
|
if (res['address-transactions']) {
|
||||||
this.checkAddressBalance()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -398,12 +395,13 @@
|
||||||
|
|
||||||
// empty for onchain
|
// empty for onchain
|
||||||
this.wallet.inkey = '{{ wallet_inkey }}'
|
this.wallet.inkey = '{{ wallet_inkey }}'
|
||||||
|
this.startPaymentNotifier()
|
||||||
|
|
||||||
this.refreshProgres()
|
this.refreshProgres()
|
||||||
if (!this.charge.paid) {
|
if (!this.charge.paid) {
|
||||||
this.loopRefresh()
|
this.loopRefresh()
|
||||||
}
|
}
|
||||||
this.startPaymentNotifier()
|
|
||||||
if (this.charge.onchainaddress) {
|
if (this.charge.onchainaddress) {
|
||||||
this.loopPingWs()
|
this.loopPingWs()
|
||||||
this.trackAddress(this.charge.onchainaddress)
|
this.trackAddress(this.charge.onchainaddress)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user