mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
#1725 - Added start date & changed display timezone
This commit is contained in:
@@ -70,7 +70,8 @@ namespace BTCPayServer.Controllers
|
|||||||
ClaimedAmount = amountDue,
|
ClaimedAmount = amountDue,
|
||||||
AmountDueFormatted = _currencyNameTable.FormatCurrency(amountDue, blob.Currency),
|
AmountDueFormatted = _currencyNameTable.FormatCurrency(amountDue, blob.Currency),
|
||||||
CurrencyData = cd,
|
CurrencyData = cd,
|
||||||
LastUpdated = DateTime.Now,
|
StartDate = pp.StartDate,
|
||||||
|
LastRefreshed = DateTime.Now,
|
||||||
Payouts = payouts
|
Payouts = payouts
|
||||||
.Select(entity => new ViewPullPaymentModel.PayoutLine
|
.Select(entity => new ViewPullPaymentModel.PayoutLine
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -76,7 +76,8 @@ namespace BTCPayServer.Models
|
|||||||
public string EmbeddedCSS { get; set; }
|
public string EmbeddedCSS { get; set; }
|
||||||
public string CustomCSSLink { get; set; }
|
public string CustomCSSLink { get; set; }
|
||||||
public List<PayoutLine> Payouts { get; set; } = new List<PayoutLine>();
|
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 CurrencyData CurrencyData { get; set; }
|
||||||
public string AmountCollectedFormatted { get; set; }
|
public string AmountCollectedFormatted { get; set; }
|
||||||
public string AmountFormatted { get; set; }
|
public string AmountFormatted { get; set; }
|
||||||
|
|||||||
@@ -89,9 +89,14 @@
|
|||||||
<h2 class="h4 mb-3">@Model.Title</h2>
|
<h2 class="h4 mb-3">@Model.Title</h2>
|
||||||
}
|
}
|
||||||
<div class="d-flex align-items-center">
|
<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">
|
<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
|
Copy Link
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>@file.FileName</td>
|
<td>@file.FileName</td>
|
||||||
<td>@file.Timestamp.ToBrowserDate2()</td>
|
<td>@file.Timestamp.ToBrowserDate()</td>
|
||||||
<td>@file.ApplicationUser.UserName</td>
|
<td>@file.ApplicationUser.UserName</td>
|
||||||
<td>
|
<td>
|
||||||
<a asp-action="Files" asp-route-fileId="@file.Id">Get Link</a>
|
<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)
|
public static HtmlString ToBrowserDate(this DateTimeOffset date)
|
||||||
{
|
{
|
||||||
var hello = date.ToString("o", CultureInfo.InvariantCulture);
|
var displayDate = date.ToString("g", CultureInfo.InvariantCulture);
|
||||||
return new HtmlString($"<span class='localizeDate'>{hello}</span>");
|
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);
|
var displayDate = date.ToString("g", CultureInfo.InvariantCulture);
|
||||||
return new HtmlString($"<span class='localizeDate'>{hello}</span>");
|
return new HtmlString($"<span class='localizeDate'>{displayDate}</span>");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string ToTimeAgo(this DateTimeOffset date)
|
public static string ToTimeAgo(this DateTimeOffset date)
|
||||||
{
|
{
|
||||||
var formatted = (DateTimeOffset.UtcNow - date).TimeString() + " ago";
|
var formatted = (DateTimeOffset.UtcNow - date).TimeString() + " ago";
|
||||||
|
|||||||
Reference in New Issue
Block a user