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

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