mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
#1725 - Added start date & changed display timezone
This commit is contained in:
parent
e31b5529b0
commit
da95bd6127
@ -70,7 +70,8 @@ namespace BTCPayServer.Controllers
|
||||
ClaimedAmount = amountDue,
|
||||
AmountDueFormatted = _currencyNameTable.FormatCurrency(amountDue, blob.Currency),
|
||||
CurrencyData = cd,
|
||||
LastUpdated = DateTime.Now,
|
||||
StartDate = pp.StartDate,
|
||||
LastRefreshed = DateTime.Now,
|
||||
Payouts = payouts
|
||||
.Select(entity => new ViewPullPaymentModel.PayoutLine
|
||||
{
|
||||
|
@ -76,7 +76,8 @@ namespace BTCPayServer.Models
|
||||
public string EmbeddedCSS { get; set; }
|
||||
public string CustomCSSLink { get; set; }
|
||||
public List<PayoutLine> Payouts { get; set; } = new List<PayoutLine>();
|
||||
public DateTime LastUpdated { get; set; }
|
||||
public DateTimeOffset StartDate { get; set; }
|
||||
public DateTime LastRefreshed { get; set; }
|
||||
public CurrencyData CurrencyData { get; set; }
|
||||
public string AmountCollectedFormatted { get; set; }
|
||||
public string AmountFormatted { get; set; }
|
||||
|
@ -89,9 +89,14 @@
|
||||
<h2 class="h4 mb-3">@Model.Title</h2>
|
||||
}
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="text-muted text-nowrap">Last Updated</span>
|
||||
<span class="text-muted text-nowrap">Start Date</span>
|
||||
|
||||
<span class="text-nowrap">@Model.LastUpdated.ToString("g")</span>
|
||||
<span class="text-nowrap">@Model.StartDate.ToBrowserDate()</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="text-muted text-nowrap">Last Refreshed</span>
|
||||
|
||||
<span class="text-nowrap">@Model.LastRefreshed.ToBrowserDate()</span>
|
||||
<button type="button" class="btn btn-link d-none d-lg-inline-block d-print-none border-0 p-0 ml-4 only-for-js" id="copyLink">
|
||||
Copy Link
|
||||
</button>
|
||||
|
@ -28,7 +28,7 @@
|
||||
{
|
||||
<tr>
|
||||
<td>@file.FileName</td>
|
||||
<td>@file.Timestamp.ToBrowserDate2()</td>
|
||||
<td>@file.Timestamp.ToBrowserDate()</td>
|
||||
<td>@file.ApplicationUser.UserName</td>
|
||||
<td>
|
||||
<a asp-action="Files" asp-route-fileId="@file.Id">Get Link</a>
|
||||
|
@ -28,15 +28,16 @@ namespace BTCPayServer.Views
|
||||
|
||||
public static HtmlString ToBrowserDate(this DateTimeOffset date)
|
||||
{
|
||||
var hello = date.ToString("o", CultureInfo.InvariantCulture);
|
||||
return new HtmlString($"<span class='localizeDate'>{hello}</span>");
|
||||
var displayDate = date.ToString("g", CultureInfo.InvariantCulture);
|
||||
return new HtmlString($"<span class='localizeDate'>{displayDate}</span>");
|
||||
}
|
||||
|
||||
public static HtmlString ToBrowserDate2(this DateTime date)
|
||||
public static HtmlString ToBrowserDate(this DateTime date)
|
||||
{
|
||||
var hello = date.ToString("o", CultureInfo.InvariantCulture);
|
||||
return new HtmlString($"<span class='localizeDate'>{hello}</span>");
|
||||
var displayDate = date.ToString("g", CultureInfo.InvariantCulture);
|
||||
return new HtmlString($"<span class='localizeDate'>{displayDate}</span>");
|
||||
}
|
||||
|
||||
public static string ToTimeAgo(this DateTimeOffset date)
|
||||
{
|
||||
var formatted = (DateTimeOffset.UtcNow - date).TimeString() + " ago";
|
||||
|
Loading…
Reference in New Issue
Block a user