mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
143d5f69c1
* Fix CSP for inline handlers on LND seed backup page * Fix CSP for inline handlers on checkout page * Fix CSP for inline handlers on wallet sign pages * Fix CSP for inline handlers on invoices list page * Fix CSP for inline handlers on payouts page * Fix CSP for inline handlers on confirm API key page * Fix CSP for inline handlers on store rates page * Fix CSP for inline handlers on notifications page * Fix CSP for inline handlers on dynamic DNS page * Fix CSP for inline handlers on checkout experience page
65 lines
3.2 KiB
Plaintext
65 lines
3.2 KiB
Plaintext
@model LndSeedBackupViewModel
|
|
@{
|
|
ViewData.SetActivePageAndTitle(ServerNavPages.Services, "LND Seed Backup");
|
|
}
|
|
|
|
<h2 class="mb-4">@ViewData["Title"]</h2>
|
|
|
|
@if (Model.IsWalletUnlockPresent)
|
|
{
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<div class="form-group">
|
|
<p>The LND seed backup is useful to recover funds of your LND wallet in case of a corruption of your server.</p>
|
|
<p>The recovering process is documented by LND on <a href="https://github.com/lightningnetwork/lnd/blob/master/docs/recovery.md" rel="noreferrer noopener">this page</a>.</p>
|
|
</div>
|
|
<button class="btn btn-primary @(Model.Removed ? "collapse" : "")" id="details" type="button">See confidential seed information</button>
|
|
|
|
@if (Model.Removed)
|
|
{
|
|
<div class="alert alert-light d-flex align-items-center" role="alert">
|
|
<vc:icon symbol="warning" />
|
|
<span class="ms-3" id="Seed">@Model.Seed</span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="form-group @(Model.Removed ? "" : "collapse")">
|
|
<div class="input-group">
|
|
<label asp-for="Seed" class="input-group-text"><span class="input-group-addon fa fa-eye"></span><span class="ms-2">Seed</span></label>
|
|
<textarea asp-for="Seed" class="form-control" readonly rows="3"></textarea>
|
|
</div>
|
|
</div>
|
|
<div class="form-group collapse">
|
|
<div class="input-group">
|
|
<label asp-for="WalletPassword" class="input-group-text"><span class="input-group-addon fa fa-lock"></span><span class="ms-2">Password</span></label>
|
|
<input asp-for="WalletPassword" class="form-control" readonly />
|
|
</div>
|
|
</div>
|
|
<div class="form-group collapse">
|
|
<form method="get" asp-action="RemoveLndSeed" asp-route-serviceName="@Context.GetRouteValue("serviceName")" asp-route-cryptoCode="@Context.GetRouteValue("cryptoCode")">
|
|
<button id="delete" class="btn btn-primary" type="submit" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-confirm-input="DELETE">Delete LND seed from server</button>
|
|
</form>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@if (!Model.Removed)
|
|
{
|
|
<partial name="_Confirm" model="@(new ConfirmModel("Delete LND seed", "This action will permanently delete your LND seed and password. You will not be able to recover them if you don't have a backup.", "Delete"))"/>
|
|
}
|
|
|
|
@section PageFootContent {
|
|
<script>
|
|
delegate('click', '#Seed', event => { event.target.select() })
|
|
delegate('click', '#WalletPassword', event => { event.target.select() })
|
|
delegate('click', '#delete', event => { event.preventDefault() })
|
|
delegate('click', '#details', event => {
|
|
document.querySelectorAll('.form-group.collapse').forEach(el => el.classList.remove('collapse'))
|
|
event.target.classList.add('collapse')
|
|
})
|
|
</script>
|
|
}
|