mirror of
https://github.com/aljazceru/btcpayserver-breez-nodeless-plugin.git
synced 2025-12-17 08:34:20 +01:00
- 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
106 lines
4.2 KiB
Plaintext
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("Breez", "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>Breez 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">
|
|
Breez 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 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", "Breez", 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", "Breez", 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 Breez node information: @ex.Message</p>
|
|
<p class="mb-0">This may be due to SDK v0.4.1 compatibility changes.</p>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div> |