Files
btcpayserver-breez-nodeless…/BTCPayServer.Plugins.BreezSpark/Views/BreezSpark/Configure.cshtml
2025-12-10 17:44:29 +01:00

45 lines
2.2 KiB
Plaintext

@using BTCPayServer
@using BTCPayServer.Abstractions.Extensions
@using BTCPayServer.Plugins.BreezSpark
@model BTCPayServer.Plugins.BreezSpark.BreezSparkSettings?
@inject BreezSparkService BreezService
@{
ViewData.SetActivePage("Breez", "Configure", "Configure");
var storeId = Context.GetCurrentStoreId();
var active = (await BreezService.Get(storeId)) is not null;
}
<form method="post" asp-action="Configure" asp-controller="BreezSpark" asp-route-storeId="@storeId" enctype="multipart/form-data">
<div class="row mb-4">
<div class="col-12">
<div class="d-flex align-items-center justify-content-between mb-3">
<h3 class="mb-0">
<span>@ViewData["Title"]</span>
</h3>
<div class="d-flex gap-3 mt-3 mt-sm-0">
<button name="command" type="submit" value="save" class="btn btn-primary">Save</button>
@if (active)
{
<button name="command" type="submit" value="clear" class="btn btn-danger">Clear</button>
}
</div>
</div>
<div class="form-group">
<label asp-for="Mnemonic" class="form-label">Mnemonic</label>
<input value="@Model?.Mnemonic" asp-for="Mnemonic" class="form-control" type="password" disabled="@active"/>
<span asp-validation-for="Mnemonic" class="text-danger"></span>
<span class="text-muted">A Bitcoin 12-word mnemonic seed phrase.<strong>BACK THIS UP SAFELY! GENERATE IT RANDOMLY! SERVER ADMINS HAVE ACCESS TO THIS!</strong></span>
</div>
<div class="form-group">
<label asp-for="ApiKey" class="form-label">Breez API Key</label>
<input asp-for="ApiKey" class="form-control" placeholder="Defaults to public key if left empty"/>
<span asp-validation-for="ApiKey" class="text-danger"></span>
<span class="text-muted">Optional. Leave blank to use the default Breez API key.</span>
</div>
<input type="hidden" asp-for="PaymentKey"/>
</div>
</div>
</form>