Archived
1
0

Move login page to browser directory

Fixes it not being included in the optimized build as well as making it
more consistent.
This commit is contained in:
Asher
2019-10-21 14:54:32 -05:00
parent 76f6ff4145
commit ece840834d
4 changed files with 4 additions and 3 deletions

View File

@ -375,7 +375,7 @@ export abstract class Server {
}
private async getLogin(error: string = "", payload?: LoginPayload): Promise<Response> {
const filePath = path.join(this.serverRoot, "login/index.html");
const filePath = path.join(this.serverRoot, "browser/login.html");
const content = (await util.promisify(fs.readFile)(filePath, "utf8"))
.replace("{{ERROR}}", error)
.replace("display:none", error ? "display:block" : "display:none")
@ -536,7 +536,7 @@ export class MainServer extends Server {
}
private async getRoot(request: http.IncomingMessage, parsedUrl: url.UrlWithParsedQuery): Promise<Response> {
const filePath = path.join(this.rootPath, "out/vs/server/src/browser/workbench.html");
const filePath = path.join(this.serverRoot, "browser/workbench.html");
let [content, startPath] = await Promise.all([
util.promisify(fs.readFile)(filePath, "utf8"),
this.getFirstValidPath([