Merge a8be1f4fb9344bbcf0ff2bf1904cbbd2aa35cae7 into cda4559cfd5948dbb18dc078c48a3e62121218e5

This commit is contained in:
Ayanami 2022-05-24 19:47:21 +09:00 committed by GitHub
commit 2e1cde2e64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 3 deletions

View File

@ -312,6 +312,7 @@
<input id="newBitcoinAddress" type="text" class="form-control address" value="" readonly>
<span class="input-group-btn">
<button class="qrcodeBtn btn btn-default" type="button" data-toggle="modal" data-target="#modalQrcode"><span class="glyphicon glyphicon-qrcode"></span></button>
<button class="copyKey btn btn-default" type="button"><span class="glyphicon glyphicon-copy"></span></button>
</span>
</div>
@ -322,6 +323,7 @@
<input id="newPrivKey" type="password" class="form-control" value="" readonly>
<span class="input-group-btn">
<button class="showKey btn btn-default" type="button">Show</button>
<button class="copyKey btn btn-default" type="button"><span class="glyphicon glyphicon-copy"></span></button>
</span>
</div>
@ -384,6 +386,7 @@
<input id="newSegWitAddress" type="text" class="form-control address" value="" readonly>
<span class="input-group-btn">
<button class="qrcodeBtn btn btn-default" type="button" data-toggle="modal" data-target="#modalQrcode"><span class="glyphicon glyphicon-qrcode"></span></button>
<button class="copyKey btn btn-default" type="button"><span class="glyphicon glyphicon-copy"></span></button>
</span>
</div>
@ -398,6 +401,7 @@
<input id="newSegWitPrivKey" type="password" class="form-control" value="" readonly>
<span class="input-group-btn">
<button class="showKey btn btn-default" type="button">Show</button>
<button class="copyKey btn btn-default" type="button"><span class="glyphicon glyphicon-copy"></span></button>
</span>
</div>
@ -776,11 +780,12 @@
<div id="transactionCreate" class="alert alert-success hidden">
<label>Transaction</label>
<button class="copyGenerated btn btn-default" type="button" style="float:right;"><span class="glyphicon glyphicon-copy"></span></button>
<button class="qrcodeBtn btn btn-default" type="button" data-toggle="modal" data-target="#modalQrcode" style="float:right;"><span class="glyphicon glyphicon-qrcode"></span></button>
<p>The transaction below has been generated and encoded. It can be broadcasted once it has been signed.</p>
<br>
<textarea class="form-control" style="height:150px" readonly></textarea>
<textarea class="form-control" style="height:150px" id="generated-transaction" readonly></textarea>
<p class="text-muted">Size: <span class="txSize">0</span> <i>bytes</i></p>
</div>
@ -1323,11 +1328,12 @@
<div class="alert alert-success hidden" id="signedData">
<label>Signed transaction</label>
<button class="copySigned btn btn-default" type="button" style="float:right;"><span class="glyphicon glyphicon-copy"></span></button>
<button class="qrcodeBtn btn btn-default" type="button" data-toggle="modal" data-target="#modalQrcode" style="float:right;"><span class="glyphicon glyphicon-qrcode"></span></button>
<p>The above transaction has been signed:</p>
<textarea class="form-control script" style="height:160px" readonly></textarea>
<textarea class="form-control script" style="height:160px" id="signed-transaction" readonly></textarea>
<p class="text-muted">Size: <span class="txSize">0</span> <i>bytes</i></p>
</div>

View File

@ -1799,6 +1799,18 @@ $(document).ready(function() {
$("input[type='password']",$(this).parent().parent()).attr('type','text');
});
$(".copyKey").click(function(){
navigator.clipboard.writeText($("input",$(this).parent().parent()).val());
});
$(".copyGenerated").click(function(){
navigator.clipboard.writeText($("#generated-transaction").val());
});
$(".copySigned").click(function(){
navigator.clipboard.writeText($("#signed-transaction").val());
});
$("#homeBtn").click(function(e){
e.preventDefault();
history.pushState(null, null, '#home');