diff --git a/Core/Helper/SystemHelper.cs b/Core/Helper/SystemHelper.cs index e3836ba..80d9b83 100644 --- a/Core/Helper/SystemHelper.cs +++ b/Core/Helper/SystemHelper.cs @@ -448,7 +448,7 @@ namespace Core.Helper return result; } - public static string GetProperDurationTime(int durationSeconds, bool includeDays = true) + public static string GetProperDurationTime(int durationSeconds, bool includeDays = true, bool shortOutput = false) { string result = ""; @@ -476,7 +476,7 @@ namespace Core.Helper result += minutes.ToString() + "m"; } - if (seconds > 0) + if ((!shortOutput && seconds > 0) || (shortOutput && days == 0)) { if (minutes > 0 || hours > 0 || days > 0) result += " "; result += seconds.ToString() + "s"; diff --git a/Monitor/Pages/_get/DashboardTop.cshtml b/Monitor/Pages/_get/DashboardTop.cshtml index fc7f5d6..849aa86 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml +++ b/Monitor/Pages/_get/DashboardTop.cshtml @@ -94,8 +94,7 @@
Market | -Age | +Market | 24H | Cost | @@ -114,7 +113,7 @@ mps = Model.Summary.MarketSummary[dcaLogEntry.Market]; } - string bagAgeText = Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(Model.DateTimeNow.Subtract(dcaLogEntry.FirstBoughtDate).TotalSeconds)); + string bagAgeText = Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(Model.DateTimeNow.Subtract(dcaLogEntry.FirstBoughtDate).TotalSeconds), true, true); bool dcaEnabled = true; if (mps != null) { @@ -165,16 +164,20 @@ // Render the row |
---|---|---|---|---|---|
@dcaLogEntry.Market | - } else - { -@dcaLogEntry.Market | - } - -@bagAgeText | +
+ @if (mps == null || mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0)
+ {
+ @dcaLogEntry.Market
+ } else
+ {
+ @dcaLogEntry.Market
+ }
+ + @bagAgeText + |
+
@Html.Raw((dcaLogEntry.PercChange * 100).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))% |