Skip to content

Commit 4227c7f

Browse files
committed
fixup qrcode and { error
1 parent 93f8df4 commit 4227c7f

File tree

4 files changed

+47
-58
lines changed

4 files changed

+47
-58
lines changed

templates/watchonly/components/address-list.html

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
row-key="id"
4646
virtual-scroll
4747
:columns="addressesTable.columns"
48-
:pagination.sync="addressesTable.pagination"
48+
v-model:pagination="addressesTable.pagination"
4949
:filter="addressesTable.filter"
5050
>
5151
<template v-slot:body="props">
@@ -67,9 +67,8 @@
6767
style="color: unset"
6868
:href="'https://'+ mempoolEndpoint + '/address/' + props.row.address"
6969
target="_blank"
70-
>
71-
${props.row.address}</a
72-
>
70+
v-text="props.row.address"
71+
></a>
7372
<q-badge
7473
v-if="props.row.branch_index === 1"
7574
color="primary"
@@ -97,14 +96,14 @@
9796
:props="props"
9897
:class="props.row.amount > 0 ? 'text-green-13 text-weight-bold' : ''"
9998
>
100-
<div>${satBtc(props.row.amount)}</div>
99+
<div v-text="satBtc(props.row.amount)"></div>
101100
</q-td>
102101

103-
<q-td key="note" :props="props" :class="">
104-
<div>${props.row.note}</div>
102+
<q-td key="note" :props="props">
103+
<div v-text="props.row.note"></div>
105104
</q-td>
106-
<q-td key="wallet" :props="props" :class="">
107-
<div>${getWalletName(props.row.wallet)}</div>
105+
<q-td key="wallet" :props="props">
106+
<div v-text="getWalletName(props.row.wallet)"></div>
108107
</q-td>
109108
</q-tr>
110109
<q-tr v-show="props.row.expanded" :props="props">
@@ -192,7 +191,9 @@
192191
<div v-if="props.row.error" class="row items-center no-wrap q-mb-md">
193192
<div class="col-2 q-pr-lg"></div>
194193
<div class="col-10 q-pr-lg">
195-
<q-badge color="red">${props.row.error}</q-badge>
194+
<q-badge color="red">
195+
<span v-text="props.row.error"></span>
196+
</q-badge>
196197
</div>
197198
</div>
198199
<div

templates/watchonly/components/utxo-list.html

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,8 @@
9191
style="color: unset"
9292
:href="'https://' + mempoolEndpoint + '/address/' + props.row.address"
9393
target="_blank"
94-
>
95-
${props.row.address}</a
96-
>
94+
v-text="props.row.address"
95+
></a>
9796
<q-badge
9897
v-if="props.row.isChange"
9998
color="primary"
@@ -116,12 +115,11 @@
116115
:props="props"
117116
class="text-green-13 text-weight-bold"
118117
>
119-
<div>${satBtc(props.row.amount)}</div>
118+
<div v-text="satBtc(props.row.amount)"></div>
120119
</q-td>
121-
122-
<q-td key="date" :props="props"> ${ props.row.date } </q-td>
123-
<q-td key="wallet" :props="props" :class="">
124-
<div>${getWalletName(props.row.wallet)}</div>
120+
<q-td key="date" :props="props" v-text="props.row.date"></q-td>
121+
<q-td key="wallet" :props="props">
122+
<div v-text="getWalletName(props.row.wallet)"></div>
125123
</q-td>
126124
</q-tr>
127125
<q-tr v-show="props.row.expanded" :props="props">
@@ -133,9 +131,8 @@
133131
style="color: unset"
134132
:href="'https://' + mempoolEndpoint + '/tx/' + props.row.txId"
135133
target="_blank"
136-
>
137-
${props.row.txId}</a
138-
>
134+
v-text="props.row.txId"
135+
></a>
139136
</div>
140137
</div>
141138
</q-td>

templates/watchonly/components/wallet-list.html

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<div>
21
<q-card>
32
<q-card-section>
43
<div class="row items-center no-wrap q-mb-md">
@@ -51,7 +50,7 @@
5150
:rows="walletAccounts"
5251
row-key="id"
5352
:columns="walletsTable.columns"
54-
:pagination.sync="walletsTable.pagination"
53+
v-model:pagination="walletsTable.pagination"
5554
:filter="filter"
5655
>
5756
<template v-slot:header="props">
@@ -62,8 +61,9 @@
6261
:key="col.name"
6362
:props="props"
6463
auto-width
64+
6565
>
66-
${ col.label }
66+
<span v-text="col.label"></span>
6767
</q-th>
6868
<q-th auto-width></q-th>
6969
</q-tr>
@@ -91,17 +91,17 @@
9191
</q-badge>
9292
</q-td>
9393

94-
<q-td key="title" :props="props" :class="">
95-
<div>${props.row.title}</div>
94+
<q-td key="title" :props="props">
95+
<div v-text="props.row.title"></div>
9696
</q-td>
97-
<q-td key="amount" :props="props" :class="">
98-
<div>${getAmmountForWallet(props.row.id)}</div>
97+
<q-td key="amount" :props="props">
98+
<div v-text="getAmmountForWallet(props.row.id)"></div>
9999
</q-td>
100-
<q-td key="type" :props="props" :class="">
101-
<div>${props.row.type}</div>
100+
<q-td key="type" :props="props">
101+
<div v-text="props.row.type"></div>
102102
</q-td>
103-
<q-td key="id" :props="props" :class="">
104-
<div>${props.row.id}</div>
103+
<q-td key="id" :props="props">
104+
<div v-text="props.row.id"></div>
105105
</q-td>
106106
</q-tr>
107107
<q-tr v-show="props.row.expanded" :props="props">
@@ -117,7 +117,7 @@
117117
</div>
118118

119119
<div class="col-4">
120-
${getAccountDescription(props.row.type)}
120+
<span v-text="getAccountDescription(props.row.type)"></span>
121121
</div>
122122
<div class="col-2 q-pr-lg"></div>
123123
</div>
@@ -179,15 +179,15 @@
179179
<div class="col-2 q-pr-lg">Last Address Index:</div>
180180
<div class="col-8">
181181
<span v-if="props.row.address_no >= 0"
182-
>${props.row.address_no}</span
183-
>
182+
v-text="props.row.address_no">
183+
</span>
184184
<span v-if="props.row.address_no < 0">none</span>
185185
</div>
186186
<div class="col-2 q-pr-lg"></div>
187187
</div>
188188
<div class="row items-center no-wrap q-mb-md">
189189
<div class="col-2 q-pr-lg">Fingerprint:</div>
190-
<div class="col-8">${props.row.fingerprint}</div>
190+
<div class="col-8" v-text="props.row.fingerprint"></div>
191191
<div class="col-2 q-pr-lg"></div>
192192
</div>
193193
<div class="row items-center q-mt-md q-mb-lg">
@@ -273,12 +273,7 @@
273273
<q-dialog v-model="showQrCodeDialog" position="top">
274274
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
275275
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
276-
<qrcode
277-
:value="qrCodeValue"
278-
:options="{width: 800}"
279-
class="rounded-borders"
280-
></qrcode>
276+
<lnbits-qrcode :value="qrCodeValue"></lnbits-qrcode>
281277
</q-responsive>
282278
</q-card>
283279
</q-dialog>
284-
</div>

templates/watchonly/index.html

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<q-card>
180180
<q-card-section>
181181
<h6 class="text-subtitle1 q-my-none">
182-
{{SITE_TITLE}} Onchain Wallet (watch-only) Extension
182+
Onchain Wallet (watch-only) Extension
183183
<small>(v0.3)</small>
184184
</h6>
185185
</q-card-section>
@@ -189,19 +189,16 @@ <h6 class="text-subtitle1 q-my-none">
189189
</q-card-section>
190190
</q-card>
191191
</div>
192-
{% raw %}
193192
<q-dialog v-model="showAddress" position="top">
194193
<q-card class="q-pa-lg lnbits__dialog-card">
195194
<h5 class="text-subtitle1 q-my-none">Address Details</h5>
196195
<q-separator></q-separator><br />
197196

198197
<q-responsive :ratio="1" class="q-mx-xl q-mb-md">
199-
<qrcode
198+
<lnbits-qrcode
200199
v-if="currentAddress"
201200
:value="currentAddress.address"
202-
:options="{width: 800}"
203-
class="rounded-borders"
204-
></qrcode>
201+
></lnbits-qrcode>
205202
</q-responsive>
206203
<p v-if="currentAddress">
207204
<q-btn
@@ -211,10 +208,9 @@ <h5 class="text-subtitle1 q-my-none">Address Details</h5>
211208
icon="content_copy"
212209
@click="copyText(currentAddress.address)"
213210
class="q-ml-sm"
214-
></q-btn>
215-
216-
{{ currentAddress.address }}
217211

212+
></q-btn>
213+
<span v-text="currentAddress.address"></span>
218214
<q-btn
219215
flat
220216
dense
@@ -286,28 +282,28 @@ <h5 class="text-subtitle1 q-my-none">Enter the Signed PSBT</h5>
286282
</q-card>
287283
</q-dialog>
288284

289-
{% endraw %}
290285
</div>
291286

292287
{% endblock %} {% block vue_templates %}
293-
<template id="my-checkbox"
294-
>{% include("watchonly/components/my-checkbox.html") %}</template
295-
>
288+
296289
<template id="wallet-config"
297290
>{% include("watchonly/components/wallet-config.html") %}</template
298291
>
292+
<template id="utxo-list"
293+
>{% include("watchonly/components/utxo-list.html") %}</template
294+
>
299295
<template id="wallet-list"
300296
>{% include("watchonly/components/wallet-list.html") %}</template
301297
>
302298
<template id="address-list"
303299
>{% include("watchonly/components/address-list.html") %}</template
304300
>
301+
<template id="my-checkbox"
302+
>{% include("watchonly/components/my-checkbox.html") %}</template
303+
>
305304
<template id="history"
306305
>{% include("watchonly/components/history.html") %}</template
307306
>
308-
<template id="utxo-list"
309-
>{% include("watchonly/components/utxo-list.html") %}</template
310-
>
311307
<template id="fee-rate"
312308
>{% include("watchonly/components/fee-rate.html") %}</template
313309
>

0 commit comments

Comments
 (0)