Files
btcpayserver-breez-nodeless…/BTCPayServer.Plugins.BreezSpark/Views/BreezSpark/Info.cshtml
Aljaz Ceru 90a5c9c098 Fix: Update all view references from Breez to BreezSpark
- Fixed controller action references in Info.cshtml
- Updated partial view path in Payments.cshtml
- Fixed all SetActivePage calls to use BreezSpark
- Updated BreezPaymentsTable to BreezSparkPaymentsTable
- Fixed CSS IDs and selectors throughout views
- All navigation now correctly references BreezSpark controller
2025-12-10 21:17:46 +01:00

106 lines
4.2 KiB
Plaintext

@using Breez.Sdk.Spark
@using BTCPayServer
@using BTCPayServer.Client
@using BTCPayServer.Components.QRCode
@using BTCPayServer.Components.TruncateCenter
@using BTCPayServer.Models.StoreViewModels
@using BTCPayServer.Payments
@using BTCPayServer.Plugins.BreezSpark
@using BTCPayServer.Security
@using BTCPayServer.Services
@using BTCPayServer.Services.Invoices
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using NBitcoin
@inject BreezSparkService BreezService
@inject TransactionLinkProviders TransactionLinkProviders
@inject PaymentMethodHandlerDictionary PaymentMethodHandlerDictionary
@{
ViewData.SetActivePage("BreezSpark", "Info", "Info");
string storeId = Model switch
{
string s => s,
StoreDashboardViewModel dashboardModel => dashboardModel.StoreId,
_ => Context.GetImplicitStoreId()
};
var sdk = BreezService.GetClient(storeId)?.Sdk;
if (sdk is null)
return;
}
<div class="row mb-4 mt-4">
<div class="col-12">
<h3>BreezSpark Lightning Node Information</h3>
@try
{
if (sdk != null)
{
<div class="card">
<div class="card-header">
<h5 class="card-title mb-0">Node Status</h5>
</div>
<div class="card-body">
<p class="text-muted">
BreezSpark Lightning Node is connected and operational.
This is a simplified view for SDK v0.4.1 compatibility.
</p>
<div class="row">
<div class="col-md-6">
<dl class="row">
<dt class="col-sm-6">Status</dt>
<dd class="col-sm-6">
<span class="badge bg-success">Connected</span>
</dd>
<dt class="col-sm-6">Network</dt>
<dd class="col-sm-6">Bitcoin</dd>
<dt class="col-sm-6">Type</dt>
<dd class="col-sm-6">Breez Spark SDK v0.4.1</dd>
</dl>
</div>
<div class="col-md-6">
<dl class="row">
<dt class="col-sm-6">Service</dt>
<dd class="col-sm-6">Lightning Network</dd>
<dt class="col-sm-6">Integration</dt>
<dd class="col-sm-6">BTCPay Server</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<h5 class="card-title mb-0">Quick Actions</h5>
</div>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<a href="@Url.Action("SwapIn", "BreezSpark", new { storeId = storeId })" class="btn btn-primary w-100 mb-2">
<i class="bi bi-arrow-down-circle"></i> Swap In
</a>
</div>
<div class="col-md-6">
<a href="@Url.Action("SwapOut", "BreezSpark", new { storeId = storeId })" class="btn btn-success w-100 mb-2">
<i class="bi bi-arrow-up-circle"></i> Swap Out
</a>
</div>
</div>
</div>
</div>
}
}
catch (Exception ex)
{
<div class="alert alert-warning">
<h5>Node Information Unavailable</h5>
<p>Unable to fetch BreezSpark node information: @ex.Message</p>
<p class="mb-0">This may be due to SDK v0.4.1 compatibility changes.</p>
</div>
}
</div>
</div>