This commit is contained in:
2020-05-18 00:27:37 +00:00
parent ec58b25e1a
commit 934425e057

View File

@@ -38,6 +38,7 @@ namespace AyaNova.Api.Controllers
[HttpGet] [HttpGet]
public ContentResult Index() public ContentResult Index()
{ {
//https://superuser.com/questions/361297/what-colour-is-the-dark-green-on-old-fashioned-green-screen-computer-displays
var errorBlock = string.Empty; var errorBlock = string.Empty;
if (serverState.IsSystemLocked) if (serverState.IsSystemLocked)
errorBlock = $@"<div class=""error""><h1>SERVER ERROR</h1><h2>{serverState.Reason}</h2></div>"; errorBlock = $@"<div class=""error""><h1>SERVER ERROR</h1><h2>{serverState.Reason}</h2></div>";
@@ -78,7 +79,7 @@ namespace AyaNova.Api.Controllers
</body> </body>
</html>"; </html>";
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"(?<=\s)\s+"); System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"(?<=\s)\s+");
resp = reg.Replace(resp, string.Empty).Replace("\n","").Replace("\t",""); resp = reg.Replace(resp, string.Empty).Replace("\n", "").Replace("\t", "");
return new ContentResult return new ContentResult
{ {
ContentType = "text/html", ContentType = "text/html",