diff --git a/BTCPayServer.Abstractions/Extensions/ViewsRazor.cs b/BTCPayServer.Abstractions/Extensions/ViewsRazor.cs index e0dab593b..8f467201e 100644 --- a/BTCPayServer.Abstractions/Extensions/ViewsRazor.cs +++ b/BTCPayServer.Abstractions/Extensions/ViewsRazor.cs @@ -90,7 +90,7 @@ namespace BTCPayServer.Abstractions.Extensions public static string ToTimeAgo(this DateTimeOffset date) { var diff = DateTimeOffset.UtcNow - date; - var formatted = diff.Seconds > 0 + var formatted = diff.TotalSeconds > 0 ? $"{diff.TimeString()} ago" : $"in {diff.Negate().TimeString()}"; return formatted; @@ -113,9 +113,9 @@ namespace BTCPayServer.Abstractions.Extensions return $"{(int)timeSpan.TotalDays} day{Plural((int)timeSpan.TotalDays)}"; } - private static string Plural(int totalDays) + private static string Plural(int value) { - return totalDays > 1 ? "s" : string.Empty; + return value > 1 ? "s" : string.Empty; } } } diff --git a/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml b/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml index c1c9191d7..3d10d950e 100644 --- a/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml +++ b/BTCPayServer/Views/UIWallets/WalletTransactions.cshtml @@ -23,17 +23,12 @@ .switchTimeFormat { display: block; - max-width: 150px; - width: 150px; + max-width: 125px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } - .badge-container:not(:last-child) { - margin-bottom: 4px; - } - .badge-container { display: flex; flex-wrap: nowrap; @@ -52,12 +47,6 @@ background-color: transparent; border: 0; } - - .transaction-details-icon { - position: relative; - padding-left: 12px; - left: -8px; - } } @@ -78,10 +67,10 @@ @if (Model.Transactions.Any()) { -