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:
parent
76f6ff4145
commit
ece840834d
@ -261,7 +261,7 @@ class Builder {
|
|||||||
fs.remove(path.join(finalServerPath, "node_modules")).then(() => {
|
fs.remove(path.join(finalServerPath, "node_modules")).then(() => {
|
||||||
return fs.copy(path.join(serverPath, "node_modules"), path.join(finalServerPath, "node_modules"));
|
return fs.copy(path.join(serverPath, "node_modules"), path.join(finalServerPath, "node_modules"));
|
||||||
}),
|
}),
|
||||||
fs.copy(path.join(serverPath, "src/browser/workbench-build.html"), path.join(finalServerPath, "src/browser/workbench.html")),
|
fs.copy(path.join(finalServerPath, "src/browser/workbench-build.html"), path.join(finalServerPath, "src/browser/workbench.html")),
|
||||||
]);
|
]);
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
|
@ -24,6 +24,7 @@ const vscodeResources = [
|
|||||||
"out-build/vs/server/src/node/uriTransformer.js",
|
"out-build/vs/server/src/node/uriTransformer.js",
|
||||||
"!out-build/vs/server/doc/**",
|
"!out-build/vs/server/doc/**",
|
||||||
"out-build/vs/code/browser/workbench/**",
|
"out-build/vs/code/browser/workbench/**",
|
||||||
|
"out-build/vs/server/src/browser/*.html",
|
||||||
"out-build/vs/server/src/media/*",
|
"out-build/vs/server/src/media/*",
|
||||||
"out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js",
|
"out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js",
|
||||||
"out-build/bootstrap.js",
|
"out-build/bootstrap.js",
|
||||||
|
@ -375,7 +375,7 @@ export abstract class Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async getLogin(error: string = "", payload?: LoginPayload): Promise<Response> {
|
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"))
|
const content = (await util.promisify(fs.readFile)(filePath, "utf8"))
|
||||||
.replace("{{ERROR}}", error)
|
.replace("{{ERROR}}", error)
|
||||||
.replace("display:none", error ? "display:block" : "display:none")
|
.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> {
|
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([
|
let [content, startPath] = await Promise.all([
|
||||||
util.promisify(fs.readFile)(filePath, "utf8"),
|
util.promisify(fs.readFile)(filePath, "utf8"),
|
||||||
this.getFirstValidPath([
|
this.getFirstValidPath([
|
||||||
|
Reference in New Issue
Block a user