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">×</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>
|
2019-11-06 13:17:50 +01:00
|
|
|
<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>
|
2019-08-10 07:05:11 +02:00
|
|
|
<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)
|
|
|
|
{
|
2019-07-19 09:27:07 +02:00
|
|
|
<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"),
|
|
|
|
{
|
2019-08-10 07:05:11 +02:00
|
|
|
text: @Safe.Json(Model.ServiceLink),
|
2019-07-19 09:27:07 +02:00
|
|
|
width: 200,
|
|
|
|
height: 200,
|
2020-03-01 23:16:24 +01:00
|
|
|
useSVG: true,
|
|
|
|
correctLevel : QRCode.CorrectLevel.M
|
2018-12-14 05:11:55 +01:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
}
|
|
|
|
}
|