2024-02-16 09:43:51 -05:00
@using BTCPayServer.Abstractions.Models
2022-07-15 05:38:33 +02:00
@model LndSeedBackupViewModel
2019-11-04 22:04:35 -06:00
@{
2021-12-16 11:17:02 +01:00
ViewData.SetActivePage(ServerNavPages.Services, "LND Seed Backup");
2019-11-04 22:04:35 -06:00
}
2024-06-19 15:23:10 +02:00
<div class="sticky-header">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a asp-action="Services">Services</a>
</li>
<li class="breadcrumb-item active" aria-current="page">@ViewData["Title"]</li>
</ol>
<h2>@ViewData["Title"]</h2>
</nav>
</div>
<partial name="_StatusMessage" />
2019-11-04 22:04:35 -06:00
2019-11-15 17:55:55 +09:00
@if (Model.IsWalletUnlockPresent)
{
<div class="row">
2021-04-08 15:32:42 +02:00
<div class="col-lg-8">
2019-11-15 17:55:55 +09:00
<div class="form-group">
2024-02-16 09:43:51 -05:00
<p>The LND seed backup is useful to recover on-chain funds of your LND wallet in case of a corruption of your server.</p>
2021-07-06 10:35:42 +02:00
<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>
2019-11-15 17:55:55 +09:00
</div>
2021-10-05 08:52:14 +02:00
<button class="btn btn-primary @(Model.Removed ? "collapse" : "")" id="details" type="button">See confidential seed information</button>
2021-09-07 04:55:53 +02:00
@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>
2019-11-15 17:55:55 +09:00
</div>
2021-09-07 04:55:53 +02:00
}
else
2019-11-04 22:04:35 -06:00
{
2021-09-07 04:55:53 +02:00
<div class="form-group @(Model.Removed ? "" : "collapse")">
2024-05-20 01:57:46 +02:00
<div class="form-group">
<label asp-for="Seed" class="form-label"></label>
<div class="input-group">
<input asp-for="Seed" type="password" class="form-control" value="@Model.Seed">
<button type="button" class="btn btn-secondary px-3 only-for-js" title="Toggle seed visibility" data-toggle-password="#Seed">
<vc:icon symbol="actions-show" />
</button>
</div>
2021-09-07 04:55:53 +02:00
</div>
2024-05-20 01:57:46 +02:00
<div class="form-group">
<label asp-for="WalletPassword" class="form-label">Password</label>
<div class="input-group">
<input asp-for="WalletPassword" type="password" class="form-control" value="@Model.WalletPassword">
<button type="button" class="btn btn-secondary px-3 only-for-js" title="Toggle password visibility" data-toggle-password="#WalletPassword">
<vc:icon symbol="actions-show" />
</button>
</div>
2019-11-15 17:55:55 +09:00
</div>
</div>
<div class="form-group collapse">
2021-05-19 04:39:27 +02:00
<form method="get" asp-action="RemoveLndSeed" asp-route-serviceName="@Context.GetRouteValue("serviceName")" asp-route-cryptoCode="@Context.GetRouteValue("cryptoCode")">
2021-09-07 04:55:53 +02:00
<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>
2019-11-15 17:55:55 +09:00
</form>
</div>
2019-11-04 22:04:35 -06:00
}
</div>
</div>
2019-11-15 17:55:55 +09:00
}
2019-11-04 22:04:35 -06:00
2021-09-07 04:55:53 +02:00
@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"))"/>
}
2021-05-19 04:39:27 +02:00
@section PageFootContent {
<script>
2021-10-05 08:52:14 +02:00
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')
})
2019-11-05 13:40:06 -06:00
</script>
2019-11-04 22:04:35 -06:00
}