Add QR code to address view in explorer

pull/56/head
Martin Boehm 2018-09-13 23:52:39 +02:00
parent 955dcfa346
commit 13dfa46edc
3 changed files with 36 additions and 22 deletions

View File

@ -189,7 +189,11 @@ h3 {
}
.data-div {
margin: 20px 0;
margin: 20px 0 30px 0;
}
.data-div .col-md-10 {
padding-left: 0;
}
.data-table {

1
static/js/qrcode.min.js vendored 100755

File diff suppressed because one or more lines are too long

View File

@ -6,27 +6,36 @@
<span class="ellipsis data">{{$addr.AddrStr}}</span>
</div>
<h3>Confirmed</h3>
<div class="data-div">
<table class="table data-table">
<tbody>
<tr>
<td style="width: 25%;">Total Received</td>
<td class="data">{{formatAmount $addr.TotalReceived}} {{$cs}}</td>
</tr>
<tr>
<td>Total Sent</td>
<td class="data">{{formatAmount $addr.TotalSent}} {{$cs}}</td>
</tr>
<tr>
<td>Final Balance</td>
<td class="data">{{formatAmount $addr.Balance}} {{$cs}}</td>
</tr>
<tr>
<td>No. Transactions</td>
<td class="data">{{$addr.TxApperances}}</td>
</tr>
</tbody>
</table>
<div class="data-div row">
<div class="col-md-10">
<table class="table data-table">
<tbody>
<tr>
<td style="width: 25%;">Total Received</td>
<td class="data">{{formatAmount $addr.TotalReceived}} {{$cs}}</td>
</tr>
<tr>
<td>Total Sent</td>
<td class="data">{{formatAmount $addr.TotalSent}} {{$cs}}</td>
</tr>
<tr>
<td>Final Balance</td>
<td class="data">{{formatAmount $addr.Balance}} {{$cs}}</td>
</tr>
<tr>
<td>No. Transactions</td>
<td class="data">{{$addr.TxApperances}}</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-2">
<div id="qrcode"></div>
<script type="text/javascript" src="/static/js/qrcode.min.js"></script>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), { text: "{{$addr.AddrStr}}", width: 160, height: 160 });
</script>
</div>
</div>
{{- if $addr.UnconfirmedTxApperances -}}
<h3>Unconfirmed</h3>