diff --git a/src/login/index.html b/src/login/index.html new file mode 100644 index 000000000..380f2f863 --- /dev/null +++ b/src/login/index.html @@ -0,0 +1,121 @@ + + + + + Authenticate: code-server + + + +
+

code-server

+

+ Enter server password +

+
+ + +
+ + +
+ + diff --git a/src/login/login.css b/src/login/login.css deleted file mode 100644 index f075a6386..000000000 --- a/src/login/login.css +++ /dev/null @@ -1,94 +0,0 @@ -html { - box-sizing: border-box; -} - -*, *:before, *:after { - box-sizing: inherit; -} - -html, body { - background-color: #FFFFFF; - height: 100%; - min-height: 100%; -} - -body { - align-items: center; - display: flex; - font-family: "monospace"; - justify-content: center; - margin: 0; - padding: 10px; -} - -.login-form { - border-radius: 5px; - box-shadow: 0 18px 80px 10px rgba(69, 65, 78, 0.08); - color: #575962; - margin-top: -10%; - max-width: 328px; - padding: 40px; - position: relative; - width: 100%; -} - -.login-form > .title { - text-align: center; - text-transform: uppercase; - font-size: 12px; - font-weight: 500; - letter-spacing: 1.5px; - line-height: 15px; - margin-bottom: 0px; - margin-bottom: 5px; - margin-top: 0px; -} - -.login-form > .subtitle { - font-size: 19px; - font-weight: bold; - line-height: 25px; - margin-bottom: 45px; - margin: 0; - text-align: center; -} - -.login-form > .field { - text-align: left; - font-size: 12px; - color: #797E84; - margin: 16px 0; -} - -.login-form > .field > .input { - background: none !important; - border: 1px solid #ccc; - border-radius: 2px; - padding: 5px; - width: 100%; -} - -.login-form > .button { - border: none; - border-radius: 24px; - box-shadow: 0 12px 17px 2px rgba(171,173,163,0.14), 0 5px 22px 4px rgba(171,173,163,0.12), 0 7px 8px -4px rgba(171,173,163,0.2); - cursor: pointer; - display: block; - padding: 15px 5px; - width: 100%; -} - -.login-form > .button:hover { - background-color: rgb(0, 122, 204); - color: #fff; -} - -.error-display { - box-sizing: border-box; - color: #bb2d0f; - font-size: 14px; - font-weight: 400; - line-height: 12px; - padding: 20px 8px 0; - text-align: center; -} diff --git a/src/login/login.html b/src/login/login.html deleted file mode 100644 index 1390bc543..000000000 --- a/src/login/login.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - Authenticate: code-server - - - -
-

code-server

-

- Enter server password -

-
- - -
- - -
- - diff --git a/src/server.ts b/src/server.ts index 9e0e0b9f0..22f6c254b 100644 --- a/src/server.ts +++ b/src/server.ts @@ -241,7 +241,7 @@ export abstract class Server { case "/login": if (!this.options.auth) { throw new HttpError("Not found", HttpCode.NotFound); - } else if (requestPath === "") { + } else if (requestPath === "/index.html") { return this.tryLogin(request); } this.ensureGet(request); @@ -318,7 +318,7 @@ export abstract class Server { } private async getLogin(error: string = "", payload?: LoginPayload): Promise { - const filePath = path.join(this.rootPath, "out/vs/server/src/login/login.html"); + const filePath = path.join(this.rootPath, "out/vs/server/src/login/index.html"); const content = (await util.promisify(fs.readFile)(filePath, "utf8")) .replace("{{ERROR}}", error) .replace("display:none", error ? "display:block" : "display:none")