btcpayserver/BTCPayServer/Views/UIServer/LndSeedBackup.cshtml
d11n 0f8da123b8
UI: Move section navigation to sidebar (#5744)
* UI: Move section navigation to sidebar

* Scroll active nav link into view

* Move CTAs to top right

* Server Settings: Make Policies first page

* Responsive table fixes

* Spacing fixes

* Add breadcrumb samples

* store settings fixes

* payment request fixes

* updates pull payment title

* adds invoice detail fix

* updates server settings breadcrumbs + copy fix

* Don't open Server Settings on Plugins page

* Add breadcrumbs to pull payment views

* adds breadcrumbs to account

* server and store breadcrumb fixes

* fixes access tokens

* Fix payment processor breadcrumbs

* fixes webhook 404

* Final touches

* Fix test

* Add breadcrumb for email rules page

* Design system updates

---------

Co-authored-by: dstrukt <gfxdsign@gmail.com>
2024-06-19 15:23:10 +02:00

84 lines
4 KiB
Text

@using BTCPayServer.Abstractions.Models
@model LndSeedBackupViewModel
@{
ViewData.SetActivePage(ServerNavPages.Services, "LND Seed Backup");
}
<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" />
@if (Model.IsWalletUnlockPresent)
{
<div class="row">
<div class="col-lg-8">
<div class="form-group">
<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>
<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="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>
</div>
<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>
</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>
}