mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-03 17:36:59 +01:00
Show unconf transactions with low opacity
This commit is contained in:
parent
9fc7f287d2
commit
0c382da561
3 changed files with 8 additions and 2 deletions
|
@ -135,6 +135,7 @@ namespace BTCPayServer.Controllers
|
|||
vm.Timestamp = tx.Timestamp;
|
||||
vm.Positive = tx.BalanceChange >= Money.Zero;
|
||||
vm.Balance = tx.BalanceChange.ToString();
|
||||
vm.IsConfirmed = tx.Confirmations != 0;
|
||||
}
|
||||
model.Transactions = model.Transactions.OrderByDescending(t => t.Timestamp).ToList();
|
||||
return View(model);
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
|||
public class TransactionViewModel
|
||||
{
|
||||
public DateTimeOffset Timestamp { get; set; }
|
||||
public bool IsConfirmed { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Link { get; set; }
|
||||
public bool Positive { get; set; }
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
max-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.unconf {
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row">
|
||||
|
@ -41,8 +45,8 @@
|
|||
<tbody>
|
||||
@foreach (var transaction in Model.Transactions)
|
||||
{
|
||||
<tr>
|
||||
<td>@transaction.Timestamp.ToBrowserDate()</td>
|
||||
<tr class="@(transaction.IsConfirmed ? "" : "unconf")">
|
||||
<td>@transaction.Timestamp.ToTimeAgo()</td>
|
||||
<td class="smMaxWidth text-truncate">
|
||||
<a href="@transaction.Link" target="_blank">
|
||||
@transaction.Id
|
||||
|
|
Loading…
Add table
Reference in a new issue