2020-10-21 14:03:11 +02:00
|
|
|
|
|
|
|
|
|
@addTagHelper *, BundlerMinifier.TagHelpers
|
2020-01-18 06:12:27 +01:00
|
|
|
|
@model BTCPayServer.Controllers.WalletReceiveViewModel
|
|
|
|
|
@{
|
|
|
|
|
Layout = "../Shared/_NavLayout.cshtml";
|
|
|
|
|
ViewData["Title"] = "Manage wallet";
|
|
|
|
|
ViewData.SetActivePageAndTitle(WalletsNavPages.Receive);
|
|
|
|
|
}
|
2020-01-18 07:32:01 +01:00
|
|
|
|
@if (TempData.HasStatusMessage())
|
|
|
|
|
{
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-12 text-center">
|
|
|
|
|
<partial name="_StatusMessage" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
2020-01-18 06:12:27 +01:00
|
|
|
|
<div class="row no-gutters">
|
2020-08-03 10:12:21 +02:00
|
|
|
|
<div class="col-lg-8 mx-auto my-auto">
|
2020-01-18 06:12:27 +01:00
|
|
|
|
<form method="post" asp-action="WalletReceive" class="card text-center">
|
2020-03-04 06:15:27 +01:00
|
|
|
|
<div class="card-body">
|
|
|
|
|
@if (string.IsNullOrEmpty(Model.Address))
|
|
|
|
|
{
|
2020-01-18 07:32:01 +01:00
|
|
|
|
|
2020-03-04 06:15:27 +01:00
|
|
|
|
<h3 class="card-title mb-3">Receive @Model.CryptoCode</h3>
|
2020-03-23 07:46:54 +01:00
|
|
|
|
<button id="generateButton" class="btn btn-lg btn-primary" type="submit" name="command" value="generate-new-address">Generate @Model.CryptoCode address</button>
|
2020-03-04 06:15:27 +01:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2020-08-03 10:12:21 +02:00
|
|
|
|
<h3 class="card-title mb-4">Next available @Model.CryptoCode address</h3>
|
2020-03-04 06:15:27 +01:00
|
|
|
|
<noscript>
|
|
|
|
|
<div class="card-body m-sm-0 p-sm-0">
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
<input type="text" class="form-control " readonly="readonly" asp-for="Address" id="address" />
|
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text fa fa-copy"> </span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-08-03 10:12:21 +02:00
|
|
|
|
<div class="row mt-4">
|
|
|
|
|
<div class="col-12 col-sm-6">
|
|
|
|
|
<button type="submit" name="command" value="generate-new-address" class="btn btn-primary w-100">Generate another address</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 col-sm-6 mt-4 mt-sm-0">
|
|
|
|
|
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-secondary w-100">Unreserve this address</button>
|
|
|
|
|
</div>
|
2020-03-19 14:31:41 +01:00
|
|
|
|
</div>
|
2020-03-04 06:15:27 +01:00
|
|
|
|
</div>
|
|
|
|
|
</noscript>
|
|
|
|
|
<div class="only-for-js card-body m-sm-0 p-sm-0" id="app">
|
|
|
|
|
<div class="qr-container mb-4">
|
|
|
|
|
<img v-bind:src="srvModel.cryptoImage" class="qr-icon" />
|
2020-05-05 10:26:57 +02:00
|
|
|
|
<qrcode v-bind:value="srvModel.address" :options="{ width: 256, margin: 1, color: {dark:'#000', light:'#f5f5f7'} }" tag="svg">
|
2020-03-04 06:15:27 +01:00
|
|
|
|
</qrcode>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="input-group copy" data-clipboard-target="#vue-address">
|
|
|
|
|
<input type="text" class=" form-control " readonly="readonly" :value="srvModel.address" id="vue-address" />
|
2020-01-18 06:12:27 +01:00
|
|
|
|
<div class="input-group-append">
|
|
|
|
|
<span class="input-group-text fa fa-copy"> </span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-08-03 10:12:21 +02:00
|
|
|
|
<div class="row mt-4">
|
|
|
|
|
<div class="col-12 col-sm-6">
|
|
|
|
|
<button type="submit" name="command" value="generate-new-address" class="btn btn-primary w-100">Generate another address</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 col-sm-6 mt-4 mt-sm-0">
|
|
|
|
|
<button type="submit" name="command" value="unreserve-current-address" class="btn btn-secondary w-100">Unreserve this address</button>
|
|
|
|
|
</div>
|
2020-03-19 14:31:41 +01:00
|
|
|
|
</div>
|
2020-01-18 06:12:27 +01:00
|
|
|
|
</div>
|
2020-03-04 06:15:27 +01:00
|
|
|
|
}
|
|
|
|
|
</div>
|
2020-01-18 06:12:27 +01:00
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@section HeadScripts
|
|
|
|
|
|
|
|
|
|
{
|
2020-10-21 14:03:11 +02:00
|
|
|
|
<bundle name="wwwroot/bundles/lightning-node-info-bundle.min.js" asp-append-version="true" />
|
2020-01-18 06:12:27 +01:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
var srvModel = @Safe.Json(Model);
|
|
|
|
|
window.onload = function() {
|
|
|
|
|
if($("#app").length <1){
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Vue.use(Toasted);
|
|
|
|
|
var app = new Vue({
|
|
|
|
|
el: '#app',
|
|
|
|
|
components: {
|
|
|
|
|
qrcode: VueQrcode
|
|
|
|
|
},
|
|
|
|
|
data: {
|
|
|
|
|
srvModel: srvModel
|
|
|
|
|
},
|
|
|
|
|
mounted: function() {
|
|
|
|
|
|
|
|
|
|
this.$nextTick(function() {
|
|
|
|
|
var copyInput = new Clipboard('.copy');
|
|
|
|
|
|
|
|
|
|
copyInput.on("success",
|
|
|
|
|
function(e) {
|
|
|
|
|
Vue.toasted.show('Copied',
|
|
|
|
|
{
|
|
|
|
|
iconPack: "fontawesome",
|
|
|
|
|
icon: "copy",
|
|
|
|
|
duration: 5000
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2020-01-18 07:32:01 +01:00
|
|
|
|
<style>
|
|
|
|
|
|
2020-01-18 06:12:27 +01:00
|
|
|
|
.qr-icon {
|
2020-01-18 07:32:01 +01:00
|
|
|
|
height: 64px;
|
|
|
|
|
width: 64px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
margin: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.qr-container {
|
|
|
|
|
position: relative;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.qr-container svg {
|
|
|
|
|
width: 256px;
|
|
|
|
|
height: 256px;
|
2020-01-18 06:12:27 +01:00
|
|
|
|
}
|
2020-01-18 07:32:01 +01:00
|
|
|
|
|
|
|
|
|
.copy {
|
|
|
|
|
cursor: copy;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
2020-01-18 06:12:27 +01:00
|
|
|
|
}
|