mirror of
https://github.com/aljazceru/btcpayserver-breez-nodeless-spark.git
synced 2025-12-17 01:14:19 +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
95 lines
2.9 KiB
Plaintext
95 lines
2.9 KiB
Plaintext
@using Breez.Sdk.Spark
|
|
@using BTCPayServer.Lightning
|
|
@using BTCPayServer.Models.StoreViewModels
|
|
@using BTCPayServer.Plugins.BreezSpark
|
|
@using BTCPayServer.Security
|
|
@model List<NormalizedPayment>
|
|
@{
|
|
var data = Model ?? new List<NormalizedPayment>();
|
|
var storeId = Context.GetImplicitStoreId();
|
|
if (data is null)
|
|
{
|
|
if (string.IsNullOrEmpty(storeId))
|
|
return;
|
|
}
|
|
|
|
var isDashboard = false;
|
|
}
|
|
@if (isDashboard)
|
|
{
|
|
<style>
|
|
@@media (min-width: 1200px) {
|
|
#breezspark-payments{
|
|
grid-column-start: 6; grid-column-end: 13;
|
|
order: -3;
|
|
}}
|
|
</style>
|
|
}
|
|
<div id="breezspark-payments" class="@(isDashboard ? "widget store-wallet-balance" : "")">
|
|
@if (isDashboard)
|
|
{
|
|
<header>
|
|
<h3>BreezSpark Payments</h3>
|
|
@if (data.Any())
|
|
{
|
|
<a asp-controller="BreezSpark" asp-action="Payments" asp-route-storeId="@storeId">View All</a>
|
|
}
|
|
</header>
|
|
}
|
|
@if (!data.Any())
|
|
{
|
|
<p class="text-secondary mt-3 mb-0">
|
|
There are no recent payments.
|
|
</p>
|
|
}
|
|
else
|
|
{
|
|
<div class="table-responsive">
|
|
<table class="table table-hover w-100">
|
|
<thead>
|
|
<tr>
|
|
<th class="w-125px">Id</th>
|
|
<th class="w-125px">Timestamp</th>
|
|
<th class="w-125px">Type</th>
|
|
<th class="w-125px">Amount</th>
|
|
<th class="text-nowrap">Fee</th>
|
|
<th class="text-nowrap">Status</th>
|
|
<th class="text-nowrap">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var payment in data)
|
|
{
|
|
<tr>
|
|
<td class="smMaxWidth text-truncate">
|
|
|
|
<span >@payment.Id</span>
|
|
|
|
</td>
|
|
<td>
|
|
<span >@DateTimeOffset.FromUnixTimeSeconds((long)payment.Timestamp).ToTimeAgo() ?? "Unknown"</span>
|
|
</td>
|
|
<td>
|
|
<span >@(payment.PaymentType == PaymentType.Receive ? "receive" : "send")</span>
|
|
</td>
|
|
<td>
|
|
<span >@payment.Amount.ToDecimal(LightMoneyUnit.BTC) BTC</span>
|
|
</td>
|
|
<td>
|
|
<span >@payment.Fee.ToDecimal(LightMoneyUnit.BTC) BTC</span>
|
|
</td>
|
|
<td>
|
|
<span >@payment.Status.ToString().ToLowerInvariant()</span>
|
|
</td>
|
|
<td>
|
|
<span class="text-break">@payment.Description</span>
|
|
</td>
|
|
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
}
|
|
</div>
|