Add QR code to address view in explorer

This commit is contained in:
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 { .data-div {
margin: 20px 0; margin: 20px 0 30px 0;
}
.data-div .col-md-10 {
padding-left: 0;
} }
.data-table { .data-table {

1
static/js/qrcode.min.js vendored Executable file

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,8 @@
<span class="ellipsis data">{{$addr.AddrStr}}</span> <span class="ellipsis data">{{$addr.AddrStr}}</span>
</div> </div>
<h3>Confirmed</h3> <h3>Confirmed</h3>
<div class="data-div"> <div class="data-div row">
<div class="col-md-10">
<table class="table data-table"> <table class="table data-table">
<tbody> <tbody>
<tr> <tr>
@ -27,6 +28,14 @@
</tr> </tr>
</tbody> </tbody>
</table> </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> </div>
{{- if $addr.UnconfirmedTxApperances -}} {{- if $addr.UnconfirmedTxApperances -}}
<h3>Unconfirmed</h3> <h3>Unconfirmed</h3>