From c9db64b49410d013bd7c41297ee7bc670112d3b6 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Wed, 4 Mar 2020 22:40:52 -0800 Subject: [PATCH] Updates to index page. --- Server/Pages/_IndexNotLoggedIn.cshtml | 5 ++- Server/Server.csproj | 2 + .../wwwroot/scripts/Pages/IndexNotLoggedIn.js | 36 +++++++++++++++++ .../scripts/Pages/IndexNotLoggedIn.js.map | 1 + .../wwwroot/scripts/Pages/IndexNotLoggedIn.ts | 40 +++++++++++++++++++ 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js create mode 100644 Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js.map create mode 100644 Server/wwwroot/scripts/Pages/IndexNotLoggedIn.ts diff --git a/Server/Pages/_IndexNotLoggedIn.cshtml b/Server/Pages/_IndexNotLoggedIn.cshtml index 5230c5a8..c2d5bcc1 100644 --- a/Server/Pages/_IndexNotLoggedIn.cshtml +++ b/Server/Pages/_IndexNotLoggedIn.cshtml @@ -7,7 +7,8 @@ }
-

Remotely Login

+

+

Welcome. Please log in@(registrationAvailable ? " or register" : "").
@@ -25,3 +26,5 @@ }
+ + \ No newline at end of file diff --git a/Server/Server.csproj b/Server/Server.csproj index ec105211..9cd34561 100644 --- a/Server/Server.csproj +++ b/Server/Server.csproj @@ -49,6 +49,7 @@ + @@ -163,6 +164,7 @@ + diff --git a/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js b/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js new file mode 100644 index 00000000..92f11cf0 --- /dev/null +++ b/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js @@ -0,0 +1,36 @@ +function typeText(textParts, header) { + var currentText = textParts[0]; + textParts[0] = currentText.slice(1); + if (currentText.length > 0) { + if (currentText.split('').some(x => x != " ")) { + header.innerHTML += currentText.charAt(0); + window.setTimeout(() => { + typeText(textParts, header); + }, 100); + } + else { + header.innerHTML = header.innerHTML.slice(0, -1); + window.setTimeout(() => { + typeText(textParts, header); + }, 50); + } + } + else { + textParts.shift(); + if (textParts.length > 0) { + window.setTimeout(() => { + typeText(textParts, header); + }, 800); + } + } +} +var text = [ + "Remote desktop", + " ", + " scripting", + " ", + "ly" +]; +var header = document.getElementById("remotelyHeader"); +typeText(text, header); +//# sourceMappingURL=IndexNotLoggedIn.js.map \ No newline at end of file diff --git a/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js.map b/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js.map new file mode 100644 index 00000000..da43fbec --- /dev/null +++ b/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IndexNotLoggedIn.js","sourceRoot":"","sources":["IndexNotLoggedIn.ts"],"names":[],"mappings":"AAAA,SAAS,QAAQ,CAAC,SAAmB,EAAE,MAA0B;IAC7D,IAAI,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC/B,SAAS,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAEpC,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;QACxB,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE;YAC3C,MAAM,CAAC,SAAS,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;gBACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAChC,CAAC,EAAE,GAAG,CAAC,CAAA;SACV;aACI;YACD,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YACjD,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;gBACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAChC,CAAC,EAAE,EAAE,CAAC,CAAA;SACT;KACJ;SACI;QACD,SAAS,CAAC,KAAK,EAAE,CAAC;QAElB,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YACtB,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;gBACnB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YAChC,CAAC,EAAE,GAAG,CAAC,CAAA;SACV;KACJ;AACL,CAAC;AAED,IAAI,IAAI,GAAG;IACP,gBAAgB;IAChB,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,IAAI;CACP,CAAC;AAEF,IAAI,MAAM,GAAG,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAuB,CAAC;AAE7E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC"} \ No newline at end of file diff --git a/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.ts b/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.ts new file mode 100644 index 00000000..fc548734 --- /dev/null +++ b/Server/wwwroot/scripts/Pages/IndexNotLoggedIn.ts @@ -0,0 +1,40 @@ +function typeText(textParts: string[], header: HTMLHeadingElement) { + var currentText = textParts[0]; + textParts[0] = currentText.slice(1); + + if (currentText.length > 0) { + if (currentText.split('').some(x => x != " ")) { + header.innerHTML += currentText.charAt(0); + window.setTimeout(() => { + typeText(textParts, header); + }, 100) + } + else { + header.innerHTML = header.innerHTML.slice(0, -1); + window.setTimeout(() => { + typeText(textParts, header); + }, 50) + } + } + else { + textParts.shift(); + + if (textParts.length > 0) { + window.setTimeout(() => { + typeText(textParts, header); + }, 800) + } + } +} + +var text = [ + "Remote desktop", + " ", + " scripting", + " ", + "ly" +]; + +var header = document.getElementById("remotelyHeader") as HTMLHeadingElement; + +typeText(text, header); \ No newline at end of file