fixup-qrcode

This commit is contained in:
dni ⚡
2024-10-10 09:07:57 +02:00
parent 5acddb75f5
commit aa236d99ce
6 changed files with 32 additions and 38 deletions
+3 -5
View File
@@ -659,11 +659,9 @@
<a <a
:href="'lightning:' + selectedExtension.payToEnable.paymentRequest" :href="'lightning:' + selectedExtension.payToEnable.paymentRequest"
> >
<q-responsive :ratio="1" class="q-mx-xl"> <lnbits-qrcode
<lnbits-qrcode :value="'lightning:' + selectedExtension.payToEnable.paymentRequest.toUpperCase()"
:value="'lightning:' + selectedExtension.payToEnable.paymentRequest.toUpperCase()" ></lnbits-qrcode>
></lnbits-qrcode>
</q-responsive>
</a> </a>
</div> </div>
<div v-else class="col"> <div v-else class="col">
+4 -9
View File
@@ -153,10 +153,7 @@
<q-card> <q-card>
<q-card-section class="text-center"> <q-card-section class="text-center">
<p v-text="$t('export_to_phone_desc')"></p> <p v-text="$t('export_to_phone_desc')"></p>
<qrcode-vue <lnbits-qrcode :value="exportUrl"></lnbits-qrcode>
:value="'{{request.base_url}}wallet?usr={{user.id}}&wal={{wallet.id}}'"
:options="{ width: 256 }"
></qrcode-vue>
</q-card-section> </q-card-section>
<q-card-actions class="flex-center q-pb-md"> <q-card-actions class="flex-center q-pb-md">
<q-btn <q-btn
@@ -369,11 +366,9 @@
> >
<div class="text-center q-mb-lg"> <div class="text-center q-mb-lg">
<a :href="'lightning:' + receive.paymentReq"> <a :href="'lightning:' + receive.paymentReq">
<q-responsive :ratio="1" class="q-mx-xl"> <lnbits-qrcode
<lnbits-qrcode :value="'lightning:' + receive.paymentReq.toUpperCase()"
:value="'lightning:' + receive.paymentReq.toUpperCase()" ></lnbits-qrcode>
></lnbits-qrcode>
</q-responsive>
</a> </a>
</div> </div>
<div class="row q-mt-lg"> <div class="row q-mt-lg">
+11 -8
View File
@@ -530,23 +530,26 @@ video {
overflow-wrap: break-word; overflow-wrap: break-word;
} }
.qrcode__wrapper canvas { .qrcode__wrapper {
position: relative; position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.qrcode__wrapper canvas {
width: 100% !important; width: 100% !important;
max-width: 100%; height: 100% !important;
max-height: 100%; max-width: 350px;
} }
.qrcode__image { .qrcode__image {
position: absolute;
max-width: 52px;
width: 15%; width: 15%;
height: 15%;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
left: 50%;
overflow: hidden; overflow: hidden;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
padding: 0.2rem; padding: 0.2rem;
border-radius: 0.2rem; border-radius: 0.2rem;
} }
+1
View File
@@ -7,6 +7,7 @@ window.app = Vue.createApp({
origin: window.location.origin, origin: window.location.origin,
wallet: LNbits.map.wallet(window.wallet), wallet: LNbits.map.wallet(window.wallet),
user: LNbits.map.user(window.user), user: LNbits.map.user(window.user),
exportUrl: `${window.location.origin}/wallet?usr=${window.user.id}&wal=${window.wallet.id}`,
receive: { receive: {
show: false, show: false,
status: 'pending', status: 'pending',
+10 -9
View File
@@ -207,23 +207,24 @@ video {
} }
// qrcode // qrcode
.qrcode__wrapper canvas { .qrcode__wrapper {
position: relative; position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.qrcode__wrapper canvas {
width: 100% !important; // important to override qrcode inline width width: 100% !important; // important to override qrcode inline width
max-width: 100%; height: 100% !important;
max-height: 100%; max-width: 350px; // default width of <lnbits-qrcode> component
} }
.qrcode__image { .qrcode__image {
position: absolute;
max-width: 52px;
width: 15%; width: 15%;
height: 15%;
overflow: hidden; overflow: hidden;
background: #fff; background: #fff;
left: 50%;
overflow: hidden; overflow: hidden;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
padding: 0.2rem; padding: 0.2rem;
border-radius: 0.2rem; border-radius: 0.2rem;
} }
+3 -7
View File
@@ -699,13 +699,9 @@
></lnbits-payment-details> ></lnbits-payment-details>
<div v-if="props.row.bolt11" class="text-center q-mb-lg"> <div v-if="props.row.bolt11" class="text-center q-mb-lg">
<a :href="'lightning:' + props.row.bolt11"> <a :href="'lightning:' + props.row.bolt11">
<q-responsive :ratio="1" class="q-mx-xl"> <lnbits-qrcode
<lnbits-qrcode :value="'lightning:' + props.row.bolt11.toUpperCase()"
:value=" ></lnbits-qrcode>
'lightning:' + props.row.bolt11.toUpperCase()
"
></lnbits-qrcode>
</q-responsive>
</a> </a>
</div> </div>
<div class="row q-mt-lg"> <div class="row q-mt-lg">