Skip to content

Commit

Permalink
Patch new HTML files
Browse files Browse the repository at this point in the history
Fixes the icons and fetching modules from the browser when behind a
reverse proxy.
  • Loading branch information
code-asher committed Oct 17, 2024
1 parent 41db568 commit 2104261
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions patches/base-path.diff
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,38 @@ Index: code-server/lib/vscode/src/vs/platform/extensionResourceLoader/common/ext
}
return undefined;
}
Index: code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
===================================================================
--- code-server.orig/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
+++ code-server/lib/vscode/src/vs/code/browser/workbench/workbench-dev.esm.html
@@ -11,7 +11,8 @@
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content="Code">
- <link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
+ <link rel="apple-touch-icon" sizes="192x192" href="{{BASE}}/_static/src/browser/media/pwa-icon-192.png" />
+ <link rel="apple-touch-icon" sizes="512x512" href="{{BASE}}/_static/src/browser/media/pwa-icon-512.png" />

<!-- Disable pinch zooming -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
@@ -26,8 +27,9 @@
<meta id="vscode-workbench-builtin-extensions" data-settings="{{WORKBENCH_BUILTIN_EXTENSIONS}}">

<!-- Workbench Icon/Manifest/CSS -->
- <link rel="icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/favicon.ico" type="image/x-icon" />
- <link rel="manifest" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/manifest.json" crossorigin="use-credentials" />
+ <link rel="icon" href="{{BASE}}/_static/src/browser/media/favicon-dark-support.svg" />
+ <link rel="alternate icon" href="{{BASE}}/_static/src/browser/media/favicon.ico" type="image/x-icon" />
+ <link rel="manifest" href="{{VS_BASE}}/manifest.json" crossorigin="use-credentials" />
<style id="vscode-css-modules" type="text/css" media="screen"></style>

</head>
@@ -37,7 +39,7 @@

<!-- Startup (do not modify order of script tags!) -->
<script>
- const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location.origin).toString();
+ const baseUrl = new URL('{{WORKBENCH_WEB_BASE_URL}}', window.location).toString();
globalThis._VSCODE_FILE_ROOT = baseUrl + '/out/';
</script>
<script>

0 comments on commit 2104261

Please sign in to comment.