Merge pull request #100 from HojouFotytu/develop

Ticker Changes
This commit is contained in:
HojouFotytu 2019-03-19 12:04:14 +09:00 committed by GitHub
commit 4b7feb9651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 27 deletions

View File

@ -8,6 +8,15 @@
<link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/tablesaw/css/tablesaw.css" rel="stylesheet" type="text/css" /> <link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/tablesaw/css/tablesaw.css" rel="stylesheet" type="text/css" />
<link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/nvd3/nv.d3.min.css" rel="stylesheet" type="text/css" /> <link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/nvd3/nv.d3.min.css" rel="stylesheet" type="text/css" />
} }
<div class="row">
<div class="col-sm-12">
<div class="card-box">
<h4 class="m-t-0 header-title text-center">Current &nbsp; @Model.Summary.MainMarket &nbsp; Price:<text class="text-autocolor">&nbsp; &nbsp; @Html.Raw(Model.MainFiatCurrencySymbol + Model.Summary.MainMarketPrice.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"))) &nbsp; </text> <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This is the value of your market currency."></i></small></h4>
</div>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="card-box"> <div class="card-box">

View File

@ -12,6 +12,21 @@
<link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
} }
<div class="row">
<div class="col-md-12">
<div class="card-box">
@{
double currentBalance = Model.PTData.GetCurrentBalance();
string currentBalanceString = currentBalance.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
if (currentBalance > 100) {
currentBalanceString = Math.Round(currentBalance, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
}
}
<h4 class="m-t-0 header-title text-center">Total Account Value: &nbsp; &nbsp; <text class="text-autocolor"> @currentBalanceString &nbsp; @Model.Summary.MainMarket &nbsp; </text> <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This value is estimated based on your sales history and any entries on the Transactions page"></i></small></h4>
</div>
</div>
</div>
@if (Model.PTData.SellLog.Count == 0) { @if (Model.PTData.SellLog.Count == 0) {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -26,7 +41,9 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="card-box"> <div class="card-box">
<h4 class="m-t-0 header-title">Sales Analysis</h4> <h4 class="m-t-0 header-title">Sales Analysis</h4>
@{ @{
double totalProfit = Model.PTData.SellLog.Sum(s => s.Profit); double totalProfit = Model.PTData.SellLog.Sum(s => s.Profit);
double totalProfitFiat = Math.Round(totalProfit * Model.Summary.MainMarketPrice, 2); double totalProfitFiat = Math.Round(totalProfit * Model.Summary.MainMarketPrice, 2);

View File

@ -40,17 +40,9 @@
</div> </div>
<!-- End Logo container--> <!-- End Logo container-->
<div class="menu-extras topbar-custom">
<ul class="list-inline float-left mb-0">
<br>&nbsp;&nbsp;&nbsp;&nbsp;
<span class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active global setting">
<b>GS:</b> @Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)
</span>
</ul>
</div>
<div class="menu-extras topbar-custom"> <div class="menu-extras topbar-custom">
<ul class="list-inline float-right mb-0"> <ul class="list-inline float-right mb-0">
<li id="ticker-widgets" class="list-inline-item ticker-widgets"></li>
<li class="menu-item list-inline-item"> <li class="menu-item list-inline-item">
<!-- Mobile menu toggle--> <!-- Mobile menu toggle-->
<a class="navbar-toggle nav-link"> <a class="navbar-toggle nav-link">
@ -62,7 +54,7 @@
</a> </a>
<!-- End mobile menu toggle--> <!-- End mobile menu toggle-->
</li> </li>
<li id="ticker-widgets" class="list-inline-item ticker-widgets"></li>
</ul> </ul>
</div> </div>
<!-- end menu-extras --> <!-- end menu-extras -->

View File

@ -22,21 +22,15 @@
string iconColor = "text-success"; string iconColor = "text-success";
string ptMagicHealthIcon = "fa-heartbeat"; string ptMagicHealthIcon = "fa-heartbeat";
string ptMagicHealthTooltip = "PT Magic is alive and healthy!"; string ptMagicHealthTooltip = "PT Magic is alive and healthy!";
if (elapsedSecondsSinceRuntime > (intervalSeconds + intervalSeconds * 0.2)) { if (elapsedSecondsSinceRuntime > (intervalSeconds + intervalSeconds * 0.5)) {
ptMagicHealthIcon = "fa-exclamation-triangle"; ptMagicHealthIcon = "fa-exclamation-triangle";
ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs!"; ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs!";
iconColor = "text-danger"; iconColor = "text-danger";
} }
} }
@if (!Model.Summary.MainMarket.Equals("USDT", StringComparison.InvariantCultureIgnoreCase)) { <div class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active global setting">
<div class="card-box card-box-mini card-box-warning-outlined" data-toggle="tooltip" data-placement="bottom" title="Value of a single @Model.Summary.MainMarket"> @Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)
<b>@Model.Summary.MainMarket: </b>@Html.Raw(Model.MainFiatCurrencySymbol + Model.Summary.MainMarketPrice.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))
</div>
}
<div class="card-box card-box-mini card-box-success-outlined" data-toggle="tooltip" data-placement="bottom" title="Approximate total value in @Model.Summary.MainMarket">
<b>TV:</b> @currentBalanceString @Model.Summary.MainMarket
</div> </div>
<div class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active single market settings"> <div class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active single market settings">
@ -44,7 +38,7 @@
</div> </div>
<div class="card-box card-box-mini card-box-ptmagic-status-outlined @iconColor" data-toggle="tooltip" data-placement="bottom" title="@ptMagicHealthTooltip"> <div class="card-box card-box-mini card-box-ptmagic-status-outlined @iconColor" data-toggle="tooltip" data-placement="bottom" title="@ptMagicHealthTooltip">
<b>PTM: </b><i class="fa @ptMagicHealthIcon @iconColor"></i> <i class="fa @ptMagicHealthIcon @iconColor"></i>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -71,12 +71,6 @@
font-size: 0.78571rem; font-size: 0.78571rem;
} }
@media only screen and (max-width: 991px) {
.ticker-widgets {
display:none;
}
}
.ticker-widgets div { .ticker-widgets div {
display: inline-block; display: inline-block;
margin-top: 12px; margin-top: 12px;

View File

@ -7,7 +7,7 @@ using Core.Helper;
using Core.Main.DataObjects.PTMagicData; using Core.Main.DataObjects.PTMagicData;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
[assembly: AssemblyVersion("2.1.3")] [assembly: AssemblyVersion("2.2.0")]
[assembly: AssemblyProduct("PT Magic")] [assembly: AssemblyProduct("PT Magic")]
namespace PTMagic namespace PTMagic