btcpayserver/BTCPayServer/Views/Server/LightningWalletServices.cshtml

82 lines
2.5 KiB
Plaintext
Raw Normal View History

2019-02-22 07:06:52 +01:00
@model LightningWalletServices
2018-12-14 05:11:55 +01:00
@{
ViewData.SetActivePageAndTitle(ServerNavPages.Services);
}
2019-02-22 07:06:52 +01:00
<h4>@Model.WalletName</h4>
2019-10-31 07:19:38 +01:00
<partial name="_StatusMessage" />
2018-12-14 05:11:55 +01:00
@if (Model.ShowQR)
{
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<div>
<span><b>CONFIDENTIAL:</b> This QR Code is confidential, close this window as soon as you don't need it anymore.<br /></span>
<span>A malicious actor with access to this QR Code could steal the funds on your lightning wallet.</span>
</div>
</div>
}
<div class="row">
<div class="col-md-6">
<div asp-validation-summary="All" class="text-danger"></div>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="form-group">
<h5>Browser connection</h5>
<p>
<span>You can go to @Model.WalletName from your browser by <a href="@Model.ServiceLink">clicking here</a><br /></span>
2018-12-14 05:11:55 +01:00
</p>
</div>
<div class="form-group">
<h5>QR Code connection</h5>
<p>
2019-03-07 05:14:47 +01:00
<span>You can use QR Code to connect to your @Model.WalletName from your mobile.<br /></span>
2018-12-14 05:11:55 +01:00
</p>
</div>
<div class="form-group">
@if (!Model.ShowQR)
{
<div class="form-group">
<form method="get">
<input type="hidden" asp-for="ShowQR" value="true" />
<button type="submit" class="btn btn-primary">Show Confidential QR Code</button>
</form>
</div>
}
else
{
<div class="form-group">
<div id="qrCode"></div>
<div id="qrCodeData" data-url="@Model.ServiceLink"></div>
2018-12-14 05:11:55 +01:00
</div>
}
</div>
</div>
</div>
@section Scripts {
@await Html.PartialAsync("_ValidationScriptsPartial")
@if (Model.ShowQR)
{
<script type="text/javascript" src="~/js/qrcode.js"></script>
2018-12-14 05:11:55 +01:00
<script type="text/javascript">
new QRCode(document.getElementById("qrCode"),
{
text: @Safe.Json(Model.ServiceLink),
width: 200,
height: 200,
useSVG: true,
correctLevel : QRCode.CorrectLevel.M
2018-12-14 05:11:55 +01:00
});
</script>
}
}