mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-12 10:30:47 +01:00
style fixes & fixes for wipe data
This commit is contained in:
parent
1d4d5127b1
commit
1d6eee0de7
2 changed files with 28 additions and 20 deletions
|
@ -98,13 +98,13 @@ namespace BTCPayServer.Plugins.BoltcardBalance.Controllers
|
|||
BoltcardKeysResetLink = $"boltcard://reset?url={GetBoltcardDeeplinkUrl(pp.Id, OnExistingBehavior.KeepVersion)}",
|
||||
WipeData = JObject.FromObject(new
|
||||
{
|
||||
version = registration.Version,
|
||||
version = 1,
|
||||
action = "wipe",
|
||||
K0 = Encoders.Hex.EncodeData(boltCardKeys.AppMasterKey.ToBytes()).ToUpperInvariant(),
|
||||
K1 = Encoders.Hex.EncodeData(boltCardKeys.EncryptionKey.ToBytes()).ToUpperInvariant(),
|
||||
K2 = Encoders.Hex.EncodeData(boltCardKeys.AuthenticationKey.ToBytes()).ToUpperInvariant(),
|
||||
K3 = Encoders.Hex.EncodeData(boltCardKeys.K3.ToBytes()).ToUpperInvariant(),
|
||||
K4 = Encoders.Hex.EncodeData(boltCardKeys.K4.ToBytes()).ToUpperInvariant(),
|
||||
k0 = Encoders.Hex.EncodeData(boltCardKeys.AppMasterKey.ToBytes()).ToUpperInvariant(),
|
||||
k1 = Encoders.Hex.EncodeData(boltCardKeys.EncryptionKey.ToBytes()).ToUpperInvariant(),
|
||||
k2 = Encoders.Hex.EncodeData(boltCardKeys.AuthenticationKey.ToBytes()).ToUpperInvariant(),
|
||||
k3 = Encoders.Hex.EncodeData(boltCardKeys.K3.ToBytes()).ToUpperInvariant(),
|
||||
k4 = Encoders.Hex.EncodeData(boltCardKeys.K4.ToBytes()).ToUpperInvariant(),
|
||||
|
||||
}).ToString(Newtonsoft.Json.Formatting.None),
|
||||
PullPaymentLink = Url.Action(nameof(UIPullPaymentController.ViewPullPayment), "UIPullPayment", new { pullPaymentId = pp.Id }, Request.Scheme, Request.Host.ToString())
|
||||
|
|
|
@ -36,25 +36,33 @@
|
|||
}
|
||||
<div class="d-flex justify-content-center nfc-supported">
|
||||
<div class="boltcard-reset boltcard-details mt-3 mt-sm-0 w-100 text-center">
|
||||
<div class="input-group">
|
||||
|
||||
<a class="btn btn-outline-danger form-contrrol" href="@Model.BoltcardKeysResetLink">Reset Boltcard</a>
|
||||
<button type="button" class="btn btn-link" id="show-wipe-qr">
|
||||
<span class="fa fa-qrcode fa-2x" title="Show wipe QR"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div id="wipe-qr" class="d-none d-flex cursor-pointer">
|
||||
|
||||
<vc:qr-code data="@Model.WipeData" data-clipboard-target="#qr-wipe-code-data-input" />
|
||||
<div class="input-group input-group-sm mt-3">
|
||||
<input type="text" class="form-control" readonly value="@Model.WipeData" id="qr-wipe-code-data-input">
|
||||
<button type="button" class="btn btn-outline-secondary px-3" data-clipboard-target="#qr-wipe-code-data-input">
|
||||
<vc:icon symbol="copy" />
|
||||
<div class="d-flex justify-content-center">
|
||||
<div class="input-group">
|
||||
|
||||
<a class="btn btn-outline-danger form-control " href="@Model.BoltcardKeysResetLink">Reset Boltcard</a>
|
||||
<button type="button" class="btn btn-outline-danger input-group-btn" id="show-wipe-qr">
|
||||
<span class="fa fa-qrcode fa-2x" title="Show wipe QR"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="wipe-qr" class="d-none mt-2 cursor-pointer" data-clipboard-target="#qr-wipe-code-data-input">
|
||||
<div class="d-flex">
|
||||
|
||||
<vc:qr-code data="@Model.WipeData" />
|
||||
</div>
|
||||
|
||||
<div class="d-flex">
|
||||
<div class="input-group input-group-sm mt-3">
|
||||
<input type="text" class="form-control" readonly value="@Model.WipeData" id="qr-wipe-code-data-input">
|
||||
<button type="button" class="btn btn-outline-secondary px-3" data-clipboard-target="#qr-wipe-code-data-input">
|
||||
<vc:icon symbol="copy" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-secondary mt-2">Requires installing the <a href="https://play.google.com/store/apps/details?id=com.lightningnfcapp&hl=en&gl=US">Bolt Card Creator app</a></p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue