mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-04 01:53:52 +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.Timestamp = tx.Timestamp;
|
||||||
vm.Positive = tx.BalanceChange >= Money.Zero;
|
vm.Positive = tx.BalanceChange >= Money.Zero;
|
||||||
vm.Balance = tx.BalanceChange.ToString();
|
vm.Balance = tx.BalanceChange.ToString();
|
||||||
|
vm.IsConfirmed = tx.Confirmations != 0;
|
||||||
}
|
}
|
||||||
model.Transactions = model.Transactions.OrderByDescending(t => t.Timestamp).ToList();
|
model.Transactions = model.Transactions.OrderByDescending(t => t.Timestamp).ToList();
|
||||||
return View(model);
|
return View(model);
|
||||||
|
|
|
@ -10,6 +10,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||||
public class TransactionViewModel
|
public class TransactionViewModel
|
||||||
{
|
{
|
||||||
public DateTimeOffset Timestamp { get; set; }
|
public DateTimeOffset Timestamp { get; set; }
|
||||||
|
public bool IsConfirmed { get; set; }
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string Link { get; set; }
|
public string Link { get; set; }
|
||||||
public bool Positive { get; set; }
|
public bool Positive { get; set; }
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.unconf {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -41,8 +45,8 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach (var transaction in Model.Transactions)
|
@foreach (var transaction in Model.Transactions)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr class="@(transaction.IsConfirmed ? "" : "unconf")">
|
||||||
<td>@transaction.Timestamp.ToBrowserDate()</td>
|
<td>@transaction.Timestamp.ToTimeAgo()</td>
|
||||||
<td class="smMaxWidth text-truncate">
|
<td class="smMaxWidth text-truncate">
|
||||||
<a href="@transaction.Link" target="_blank">
|
<a href="@transaction.Link" target="_blank">
|
||||||
@transaction.Id
|
@transaction.Id
|
||||||
|
|
Loading…
Add table
Reference in a new issue