mre formats (#1733)

This commit is contained in:
Arc
2023-05-24 14:27:16 +01:00
committed by GitHub
parent d0599458c6
commit 921984e52b
4 changed files with 70 additions and 63 deletions

View File

@@ -1,6 +1,6 @@
// update cache version every time there is a new deployment // update cache version every time there is a new deployment
// so the service worker reinitializes the cache // so the service worker reinitializes the cache
const CACHE_VERSION = 28 const CACHE_VERSION = 30
const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-` const CURRENT_CACHE = `lnbits-${CACHE_VERSION}-`
const getApiKey = request => { const getApiKey = request => {

File diff suppressed because one or more lines are too long

View File

@@ -213,67 +213,73 @@ Vue.component('lnbits-payment-details', {
} }
}, },
template: ` template: `
<div class="q-py-md" style="text-align: left"> <div class="q-py-md" style="text-align: left">
<div v-if="payment.tag" class="row justify-center q-mb-md">
<q-badge v-if="hasTag" color="yellow" text-color="black"> <div v-if="payment.tag" class="row justify-center q-mb-md">
#{{ payment.tag }} <q-badge v-if="hasTag" color="yellow" text-color="black">
</q-badge> #{{ payment.tag }}
</div> </q-badge>
<div class="row"> </div>
<b v-text="$t('created')"></b>:
{{ payment.date }} ({{ payment.dateFrom }}) <div class="row">
</div> <b v-text="$t('created')"></b>:
<div class="row"> {{ payment.date }} ({{ payment.dateFrom }})
<b v-text="$t('expiry')"></b>: </div>
{{ payment.expirydate }} ({{ payment.expirydateFrom }})
</div> <div class="row">
<div class="row"> <b v-text="$t('expiry')"></b>:
<b v-text="$t('amount')"></b>: {{ payment.expirydate }} ({{ payment.expirydateFrom }})
{{ (payment.amount / 1000).toFixed(3) }} {{LNBITS_DENOMINATION}} </div>
</div>
<div class="row"> <div class="row">
<b v-text="$t('fee')"></b>: <b v-text="$t('amount')"></b>:
{{ (payment.fee / 1000).toFixed(3) }} {{LNBITS_DENOMINATION}} {{ (payment.amount / 1000).toFixed(3) }} {{LNBITS_DENOMINATION}}
</div> </div>
<div class="text-wrap">
<b style="white-space: nowrap;" v-text="$t('payment_hash')"></b>:&nbsp;{{ payment.payment_hash }} <div class="row">
<q-icon name="content_copy" @click="copyText(payment.payment_hash)" size="1em" color="grey" class="q-mb-xs cursor-pointer" /> <b v-text="$t('fee')"></b>:
</div> {{ (payment.fee / 1000).toFixed(3) }} {{LNBITS_DENOMINATION}}
<div class="text-wrap"> </div>
<b style="white-space: nowrap;" v-text="$t('memo')"></b>:&nbsp;{{ payment.memo }}
</div> <div class="text-wrap">
<div class="row" v-if="payment.webhook"> <b style="white-space: nowrap;" v-text="$t('payment_hash')"></b>:&nbsp;{{ payment.payment_hash }}
<div class="col-3"><b v-text="$t('webhook')"></b>:</div> <q-icon name="content_copy" @click="copyText(payment.payment_hash)" size="1em" color="grey" class="q-mb-xs cursor-pointer" />
<div class="col-9 text-wrap mono"> </div>
{{ payment.webhook }}
<q-badge :color="webhookStatusColor" text-color="white"> <div class="text-wrap">
{{ webhookStatusText }} <b style="white-space: nowrap;" v-text="$t('memo')"></b>:&nbsp;{{ payment.memo }}
</q-badge> </div>
</div>
</div> <div class="row" v-if="payment.webhook">
<div class="row" v-if="hasPreimage"> <b v-text="$t('webhook')"></b>:
<div class="col-3"><b v-text="$t('payment_proof')"></b>:</div> {{ payment.webhook }}
<div class="col-9 text-wrap mono">{{ payment.preimage }}</div> <q-badge :color="webhookStatusColor" text-color="white">
</div> {{ webhookStatusText }}
<div class="row" v-for="entry in extras"> </q-badge>
<div class="col-3"> </div>
<q-badge v-if="hasTag" color="secondary" text-color="white">
extra <div class="row" v-if="hasPreimage">
</q-badge> <b v-text="$t('payment_proof')"></b>:
<b>{{ entry.key }}</b>: {{ payment.preimage }}
</div> </div>
<div class="col-9 text-wrap mono">{{ entry.value }}</div>
</div> <div class="row" v-for="entry in extras">
<div class="row" v-if="hasSuccessAction"> <q-badge v-if="hasTag" color="secondary" text-color="white">
<div class="col-3"><b>Success action</b>:</div> extra
<div class="col-9"> </q-badge>
<lnbits-lnurlpay-success-action <b>{{ entry.key }}</b>:
:payment="payment" {{ entry.value }}
:success_action="payment.extra.success_action" </div>
></lnbits-lnurlpay-success-action>
</div> <div class="row" v-if="hasSuccessAction">
</div> <b>Success action</b>:
</div> <lnbits-lnurlpay-success-action
:payment="payment"
:success_action="payment.extra.success_action"
></lnbits-lnurlpay-success-action>
</div>
</div>
`, `,
computed: { computed: {
hasPreimage() { hasPreimage() {

View File

@@ -238,6 +238,7 @@
class="bg-transparent q-px-lg q-py-md" class="bg-transparent q-px-lg q-py-md"
:class="{'text-dark': !$q.dark.isActive}" :class="{'text-dark': !$q.dark.isActive}"
> >
<q-space class="q-py-lg lt-sm"></q-space>
<q-toolbar class="gt-sm"> <q-toolbar class="gt-sm">
<q-toolbar-title class="text-caption"> <q-toolbar-title class="text-caption">
{{ SITE_TITLE }}, {{SITE_TAGLINE}} {{ SITE_TITLE }}, {{SITE_TAGLINE}}