Skip to content

Commit

Permalink
fix: missing welcome assets
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jan 8, 2024
1 parent a79c3a2 commit d85e5a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"js": "always",
"mp3": "always",
"svg": "always",
"png": "always",
"json": "always",
"contribution": "always", // Hack for vscode .contribution.js files
"protocol": "always", // Hack for vscode .protocol.js files
Expand Down
13 changes: 11 additions & 2 deletions scripts/vscode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2226,14 +2226,14 @@ index b442277e920..481ab494561 100644
if (this.element && this._messagePort) {
this._messagePort.postMessage({ channel, args: data }, transferable);
diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
index 869f44526b4..0587e08a8ec 100644
index 869f44526b4..296ac140860 100644
--- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
+++ b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedDetailsRenderer.ts
@@ -17,6 +17,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { INotificationService } from 'vs/platform/notification/common/notification';
import { ILanguageService } from 'vs/editor/common/languages/language';
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
+import { FileAccess } from 'vs/base/common/network';
+import { AppResourcePath, FileAccess } from 'vs/base/common/network';


export class GettingStartedDetailsRenderer {
Expand All @@ -2253,6 +2253,15 @@ index 869f44526b4..0587e08a8ec 100644
}
} catch { }

@@ -262,7 +260,7 @@ export class GettingStartedDetailsRenderer {
}

const transformUri = (src: string, base: URI) => {
- const path = joinPath(base, src);
+ const path = FileAccess.asBrowserUri(joinPath(base, src).fsPath.slice(1) as AppResourcePath);
return asWebviewUri(path).toString(true);
};

diff --git a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts b/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts
index f0c08e1b826..e63f4724028 100644
--- a/src/vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService.ts
Expand Down
3 changes: 3 additions & 0 deletions src/service-override/welcome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import 'vs/workbench/contrib/welcomeViews/common/viewsWelcome.contribution'
import 'vs/workbench/contrib/welcomeViews/common/newFile.contribution'
// @ts-ignore
import svgAssets from 'vs/workbench/contrib/welcomeGettingStarted/common/media/*.svg'
// @ts-ignore
import pngAssets from 'vs/workbench/contrib/welcomeGettingStarted/common/media/*.png'
import { FileAccess } from 'vs/base/common/network'
import { registerAssets } from '../assets'

registerAssets(svgAssets)
registerAssets(pngAssets)

FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough', () => import('vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough'))
FileAccess.registerModuleContentProvider('vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker', () => import('vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker'))
Expand Down

0 comments on commit d85e5a2

Please sign in to comment.