Skip to content

Commit 9039517

Browse files
authored
Merge branch 'main' into feat/trusted-origins-regex
2 parents 56b0f92 + b7c7a62 commit 9039517

12 files changed

Lines changed: 54 additions & 14 deletions

File tree

lib/vscode

Submodule vscode updated 899 files

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"express": "^5.0.1",
7777
"http-proxy": "^1.18.1",
7878
"httpolyglot": "^0.1.2",
79-
"i18next": "^25.3.0",
79+
"i18next": "^25.8.3",
8080
"js-yaml": "^4.1.0",
8181
"limiter": "^2.1.0",
8282
"pem": "^1.14.8",

patches/fix-build.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/ch
1414
===================================================================
1515
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.ts
1616
+++ code-server/lib/vscode/src/vs/workbench/contrib/chat/browser/chatDebug/chatDebugEditor.ts
17-
@@ -301,7 +301,7 @@ export class ChatDebugEditor extends Edi
17+
@@ -303,7 +303,7 @@ export class ChatDebugEditor extends Edi
1818
}
1919
}
2020

patches/local-storage.diff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/configuration/browser/co
7979
});
8080
}));
8181

82-
@@ -555,6 +557,12 @@ export class WorkspaceService extends Di
82+
@@ -559,6 +561,12 @@ export class WorkspaceService extends Di
8383
previousFolders = this.workspace.folders;
8484
this.workspace.update(workspace);
8585
} else {

src/browser/pages/error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
content="style-src 'self'; manifest-src 'self'; img-src 'self' data:; font-src 'self' data:;"
1212
/>
1313
<meta name="color-scheme" content="light dark" />
14-
<title>{{ERROR_TITLE}} - code-server</title>
14+
<title>{{ERROR_TITLE}} - {{APP_NAME}}</title>
1515
<link rel="icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon-dark-support.svg" />
1616
<link rel="alternate icon" href="{{CS_STATIC_BASE}}/src/browser/media/favicon.ico" />
1717
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />

src/node/cli.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ export interface DefaultedArgs extends ConfigArgs {
519519
"extensions-dir": string
520520
"user-data-dir": string
521521
"session-socket": string
522+
"app-name": string
522523
/* Positional arguments. */
523524
_: string[]
524525
}
@@ -665,6 +666,10 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
665666
}
666667
args["proxy-domain"] = finalProxies
667668

669+
if (!args["app-name"]) {
670+
args["app-name"] = "code-server"
671+
}
672+
668673
args._ = getResolvedPathsFromArgs(args)
669674

670675
return {

src/node/i18n/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ init({
5454
lowerCaseLng: true,
5555
debug: process.env.NODE_ENV === "development",
5656
resources: defaultResources,
57+
showSupportNotice: false,
5758
})
5859

5960
export default i18next

src/node/routes/errors.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export const errorHandler: express.ErrorRequestHandler = async (err, req, res, n
5757
replaceTemplates(req, content)
5858
.replace(/{{ERROR_TITLE}}/g, statusCode.toString())
5959
.replace(/{{ERROR_HEADER}}/g, statusCode.toString())
60-
.replace(/{{ERROR_BODY}}/g, escapeHtml(err.message)),
60+
.replace(/{{ERROR_BODY}}/g, escapeHtml(err.message))
61+
.replace(/{{APP_NAME}}/g, req.args["app-name"]),
6162
)
6263
} else {
6364
res.json({

src/node/routes/login.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ const getRoot = async (req: Request, error?: Error): Promise<string> => {
2929
const content = await fs.readFile(path.join(rootPath, "src/browser/pages/login.html"), "utf8")
3030
const locale = req.args["locale"] || "en"
3131
i18n.changeLanguage(locale)
32-
const appName = req.args["app-name"] || "code-server"
33-
const welcomeText = req.args["welcome-text"] || (i18n.t("WELCOME", { app: appName }) as string)
32+
const welcomeText = req.args["welcome-text"] || (i18n.t("WELCOME", { app: req.args["app-name"] }) as string)
3433

3534
// Determine password message using i18n
3635
let passwordMsg = i18n.t("LOGIN_PASSWORD", { configFile: req.args.config })
@@ -43,7 +42,7 @@ const getRoot = async (req: Request, error?: Error): Promise<string> => {
4342
return replaceTemplates(
4443
req,
4544
content
46-
.replace(/{{I18N_LOGIN_TITLE}}/g, i18n.t("LOGIN_TITLE", { app: appName }))
45+
.replace(/{{I18N_LOGIN_TITLE}}/g, i18n.t("LOGIN_TITLE", { app: req.args["app-name"] }))
4746
.replace(/{{WELCOME_TEXT}}/g, welcomeText)
4847
.replace(/{{PASSWORD_MSG}}/g, passwordMsg)
4948
.replace(/{{I18N_LOGIN_BELOW}}/g, i18n.t("LOGIN_BELOW"))

src/node/routes/vscode.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,15 @@ router.get("/", ensureVSCodeLoaded, async (req, res, next) => {
172172
})
173173

174174
router.get("/manifest.json", async (req, res) => {
175-
const appName = req.args["app-name"] || "code-server"
176175
res.writeHead(200, { "Content-Type": "application/manifest+json" })
177176

178177
res.end(
179178
replaceTemplates(
180179
req,
181180
JSON.stringify(
182181
{
183-
name: appName,
184-
short_name: appName,
182+
name: req.args["app-name"],
183+
short_name: req.args["app-name"],
185184
start_url: ".",
186185
display: "fullscreen",
187186
display_override: ["window-controls-overlay"],

0 commit comments

Comments
 (0)