Skip to content

Commit

Permalink
fixing env issue and splash page error
Browse files Browse the repository at this point in the history
  • Loading branch information
EarliestFall988 committed Nov 27, 2023
1 parent 36872f1 commit b4cdd1b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@
.AddJsonFile("appsettings.json")
.Build();

var splash = File.ReadAllText(new Uri(Path.Combine(Directory.GetCurrentDirectory(), "splash.html")).LocalPath);

// <p>or</p>\r\n <a href=\"/api/v1/sync\">Sync Manually</a>\r\n

string linkURI = env["VALK_DASHBOARD_LINK"];
string syncURI = env["SYNC_LINK"];

//var splash = "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <title>It Works!!</title>\r\n <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\r\n <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\r\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto&display=swap\" rel=\"stylesheet\">\r\n</head>\r\n<style>\r\n .body {\r\n background-color: #171717;\r\n width: 90vw;\r\n height: 90vh;\r\n color: #ffffff;\r\n padding: 3rem;\r\n font-family: 'Roboto', sans-serif;\r\n display: block;\r\n box-sizing: border-box;\r\n }\r\n\r\n h1 {\r\n\r\n font-size: 3rem;\r\n }\r\n\r\n h1, h2 {\r\n user-select: none;\r\n }\r\n\r\n h2{\r\n font-size: 1.5rem;\r\n font-weight: 200;\r\n }\r\n\r\n p {\r\n font-size: 1.25rem;\r\n }\r\n\r\n a {\r\n font-size: 1.25rem;\r\n color: #ffff;\r\n text-decoration: none;\r\n background-color: #1d4ed8;\r\n padding: 0.25rem;\r\n border-radius: 0.25rem;\r\n }\r\n\r\n .sync-link {\r\n color: lightblue;\r\n text-decoration: underline;\r\n text-underline-offset: 0.25rem;\r\n font-size: 1.5rem;\r\n }\r\n\r\n .no-select {\r\n user-select: none;\r\n }\r\n\r\n</style>\r\n<body class=\"body\">\r\n " +
// $"<h1>It Works!πŸŽ‰πŸŽ‰</h1>\r\n <h2>Copy the link below and paste it back in the Valkyrie Connection Page</h2>\r\n <p> <span class=\"no-select\">πŸ‘‰</span><span class=\"sync-link\">{syncURI}</span></p>\r\n <p class=\"no-select\" ><a href=\"{linkURI}https://google.com\"> Go To Dashboard </a></p>\r\n</body>\r\n</html>";

var splash = "<!DOCTYPE html>\r\n<html>\r\n<head>\r\n <meta charset=\"utf-8\" />\r\n <title>It Works!!</title>\r\n <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\r\n <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\r\n <link href=\"https://fonts.googleapis.com/css2?family=Roboto&display=swap\" rel=\"stylesheet\">\r\n</head>\r\n<script>\r\n\r\n getURI = () => {\r\n document.getElementById(\"link-to-paste\").innerHTML = window.location.href + \"api/v1/sync\";\r\n }\r\n\r\n</script>\r\n<style>\r\n .body {\r\n background-color: #171717;\r\n width: 90vw;\r\n height: 90vh;\r\n color: #ffffff;\r\n padding: 3rem;\r\n font-family: 'Roboto', sans-serif;\r\n display: block;\r\n box-sizing: border-box;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h1, h2 {\r\n user-select: none;\r\n }\r\n\r\n h2 {\r\n font-size: 1.5rem;\r\n font-weight: 200;\r\n }\r\n\r\n p {\r\n font-size: 1.25rem;\r\n }\r\n\r\n a {\r\n font-size: 1.25rem;\r\n color: #ffff;\r\n text-decoration: none;\r\n background-color: #1d4ed8;\r\n padding: 0.25rem;\r\n border-radius: 0.25rem;\r\n }\r\n\r\n .sync-link {\r\n color: lightblue;\r\n text-decoration: underline;\r\n text-underline-offset: 0.25rem;\r\n font-size: 1.5rem;\r\n }\r\n\r\n .no-select {\r\n user-select: none;\r\n }\r\n</style>\r\n<body onload=\"getURI()\" class=\"body\">\r\n " +
$"<h1>It Works!πŸŽ‰πŸŽ‰</h1>\r\n <h2>Copy the link below and paste it back in the Valkyrie Connection Page</h2>\r\n <p> <span class=\"no-select\">πŸ‘‰ </span><span id=\"link-to-paste\" class=\"sync-link\"></span></p>\r\n <p class=\"no-select\"><a href=\"{linkURI ?? "https://google.com"}\"> Go To Dashboard </a></p>\r\n</body>\r\n</html>\r\n";
// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
Expand Down

0 comments on commit b4cdd1b

Please sign in to comment.