From 31a9466bf8be01e808aa6f340b9a7308305bec50 Mon Sep 17 00:00:00 2001 From: d11n Date: Fri, 24 May 2024 07:11:05 +0200 Subject: [PATCH] Dashboard: Add table-responsive wrapper for transactions and invoices (#6006) Fixes #5721. --- .../StoreRecentInvoices/Default.cshtml | 54 ++++----- .../StoreRecentTransactions/Default.cshtml | 108 +++++++++--------- BTCPayServer/wwwroot/main/site.css | 2 +- 3 files changed, 84 insertions(+), 80 deletions(-) diff --git a/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml b/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml index 32591d3bf..ba2905908 100644 --- a/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml +++ b/BTCPayServer/Components/StoreRecentInvoices/Default.cshtml @@ -34,34 +34,36 @@ } else if (Model.Invoices.Any()) { - - - - - - - - - - - @foreach (var invoice in Model.Invoices) - { +
+
DateInvoice IdStatusAmount
+ - - - - + + + + - } - -
@invoice.Date.ToTimeAgo() - @invoice.InvoiceId - - - - @DisplayFormatter.Currency(invoice.Amount, invoice.Currency) - DateInvoice IdStatusAmount
+ + + @foreach (var invoice in Model.Invoices) + { + + @invoice.Date.ToTimeAgo() + + @invoice.InvoiceId + + + + + + @DisplayFormatter.Currency(invoice.Amount, invoice.Currency) + + + } + + + } else { diff --git a/BTCPayServer/Components/StoreRecentTransactions/Default.cshtml b/BTCPayServer/Components/StoreRecentTransactions/Default.cshtml index 65bbccf52..c64a8383c 100644 --- a/BTCPayServer/Components/StoreRecentTransactions/Default.cshtml +++ b/BTCPayServer/Components/StoreRecentTransactions/Default.cshtml @@ -31,61 +31,63 @@ } else if (Model.Transactions.Any()) { - - - - - - - - - - - @foreach (var tx in Model.Transactions) - { +
+
DateTransactionLabelsAmount
+ - - - - @if (tx.Positive) - { - - } - else - { - - } + + + + - } - -
@tx.Timestamp.ToTimeAgo() - - - @if (tx.Labels.Any()) - { -
- @foreach (var label in tx.Labels) - { -
- @label.Text - @if (!string.IsNullOrEmpty(label.Link)) - { - - - - } -
- } -
- } - -
- @DisplayFormatter.Currency(tx.Balance, tx.Currency) - - @DisplayFormatter.Currency(tx.Balance, tx.Currency) - DateTransactionLabelsAmount
+ + + @foreach (var tx in Model.Transactions) + { + + @tx.Timestamp.ToTimeAgo() + + + + + @if (tx.Labels.Any()) + { +
+ @foreach (var label in tx.Labels) + { +
+ @label.Text + @if (!string.IsNullOrEmpty(label.Link)) + { + + + + } +
+ } +
+ } + + + @if (tx.Positive) + { + + @DisplayFormatter.Currency(tx.Balance, tx.Currency) + + } + else + { + + @DisplayFormatter.Currency(tx.Balance, tx.Currency) + + } + + } + + + } else { diff --git a/BTCPayServer/wwwroot/main/site.css b/BTCPayServer/wwwroot/main/site.css index 41bccdf79..af6deed2a 100644 --- a/BTCPayServer/wwwroot/main/site.css +++ b/BTCPayServer/wwwroot/main/site.css @@ -464,7 +464,7 @@ h2 .icon.icon-info { font-weight: var(--btcpay-font-weight-bold); } -.widget .table { +.widget *:not([class*='table-responsive']) > .table { margin-left: -.5rem; margin-right: -.5rem; width: calc(100% + 1rem);