diff --git a/Core/Main/PTMagicConfiguration.cs b/Core/Main/PTMagicConfiguration.cs index 7d29d14..64eda87 100644 --- a/Core/Main/PTMagicConfiguration.cs +++ b/Core/Main/PTMagicConfiguration.cs @@ -83,6 +83,25 @@ namespace Core.Main return result; } + public string GetProfitTrailerServerAPITokenMasked() + { + string result = ""; + + if (!this.GeneralSettings.Application.ProfitTrailerServerAPIToken.Equals("")) + { + result = this.GeneralSettings.Application.ProfitTrailerServerAPIToken.Substring(0, 4); + + for (int i = 1; i < this.GeneralSettings.Application.ProfitTrailerServerAPIToken.Length - 8; i++) + { + result += "*"; + } + + result += this.GeneralSettings.Application.ProfitTrailerServerAPIToken.Substring(this.GeneralSettings.Application.ProfitTrailerServerAPIToken.Length - 4); + } + + return result; + } + public GeneralSettings GeneralSettings { get diff --git a/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml index 64c3783..c128641 100644 --- a/Monitor/Pages/SettingsGeneral.cshtml +++ b/Monitor/Pages/SettingsGeneral.cshtml @@ -92,7 +92,7 @@
- + @Model.PTMagicConfiguration.GetProfitTrailerServerAPITokenMasked()