mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
06db29dd43
* Refactor confirm view: separate modal * Add delete confirmation modals for apps and FIDO2 * Add delete confirmation modals for 2FA actions * Add delete confirmation modals for api keys and webhooks * Add delete confirmation modals for stores and store users * Add delete confirmation modals for LND seed and SSH * Add delete confirmation modals for rate rule scripting * Test fixes and improvements * Add delete confirmation modals for dynamic DNS * Add delete confirmation modals for store access tokens * Add confirmation modals for pull payment archiving * Refactor confirm modal code * Add confirmation input, update wording * Update modal styles * Upgrade ChromeDriver * Simplify and unify confirmation input * Test fixes * Fix wording * Add modals for wallet replace and removal
69 lines
3.3 KiB
Plaintext
69 lines
3.3 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>
|
|
<a class="btn btn-primary @(Model.Removed ? "collapse" : "")" id="details" href="#">See confidential seed information</a>
|
|
|
|
@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" onClick="this.select();" 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" onClick="this.select();" 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>
|
|
const deleteButton = document.getElementById('delete')
|
|
deleteButton.addEventListener('click', event => {
|
|
event.preventDefault()
|
|
});
|
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
document.getElementById("details").addEventListener("click", function () {
|
|
document.querySelectorAll(".form-group.collapse").forEach(el => el.classList.remove("collapse"));
|
|
this.classList.add("collapse");
|
|
});
|
|
});
|
|
</script>
|
|
}
|