mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Add worksapce platform keys
This commit is contained in:
9
getting-started-sample/media/web.md
Normal file
9
getting-started-sample/media/web.md
Normal file
@ -0,0 +1,9 @@
|
||||
# Hello Web Users
|
||||
|
||||
[Say hello](command:getting-started-sample.sayHello)
|
||||
|
||||

|
||||
|
||||
```ts
|
||||
const a = 12;
|
||||
```
|
||||
@ -69,24 +69,52 @@
|
||||
},
|
||||
{
|
||||
"id": "mac",
|
||||
"title": "Platform: Mac",
|
||||
"title": "UI Platform: Mac",
|
||||
"description": "This step will only show on a Mac.",
|
||||
"when": "isMac",
|
||||
"media": { "markdown": "media/mac.md"}
|
||||
},
|
||||
{
|
||||
"id": "windows",
|
||||
"title": "Platform: Windows",
|
||||
"title": "UI Platform: Windows",
|
||||
"description": "This step will only show on Windows",
|
||||
"when": "isWindows",
|
||||
"media": { "markdown": "media/windows.md" }
|
||||
},
|
||||
{
|
||||
"id": "linux",
|
||||
"title": "Platform: Linux",
|
||||
"title": "UI Platform: Linux",
|
||||
"description": "This step will only show on Linux",
|
||||
"when": "isLinux",
|
||||
"media": { "markdown": "media/linux.md" }
|
||||
},
|
||||
{
|
||||
"id": "macRemote",
|
||||
"title": "Workspace Platform: Mac",
|
||||
"description": "This step will only show on Mac remotes.",
|
||||
"when": "workspacePlatform == 'mac'",
|
||||
"media": { "markdown": "media/mac.md"}
|
||||
},
|
||||
{
|
||||
"id": "windowsRemote",
|
||||
"title": "Workspace Platform: Windows",
|
||||
"description": "This step will only show on Windows remotes",
|
||||
"when": "workspacePlatform == 'windows'",
|
||||
"media": { "markdown": "media/windows.md" }
|
||||
},
|
||||
{
|
||||
"id": "linuxRemote",
|
||||
"title": "Workspace Platform: Linux",
|
||||
"description": "This step will only show on Linux remotes",
|
||||
"when": "workspacePlatform == 'linux'",
|
||||
"media": { "markdown": "media/linux.md" }
|
||||
},
|
||||
{
|
||||
"id": "webRemote",
|
||||
"title": "Workspace Platform: Web",
|
||||
"description": "This step will only show on webworker remotes",
|
||||
"when": "workspacePlatform == 'webworker'",
|
||||
"media": { "markdown": "media/linux.md" }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -168,10 +168,10 @@ class CatCodingPanel {
|
||||
|
||||
private _getHtmlForWebview(webview: vscode.Webview, catGifPath: string) {
|
||||
// Local path to main script run in the webview
|
||||
const scriptPathOnDisk = vscode.Uri.joinPath(this._extensionUri, 'media', 'main.js');
|
||||
const scriptPathOnDisk = vscode.Uri.joinPath(this._extensionUri, 'media', 'ma in.js');
|
||||
|
||||
// And the uri we use to load this script in the webview
|
||||
const scriptUri = webview.asWebviewUri(scriptPathOnDisk);
|
||||
const scriptUri = (scriptPathOnDisk).with({ 'scheme': 'vscode-resource' });
|
||||
|
||||
// Local path to css styles
|
||||
const styleResetPath = vscode.Uri.joinPath(this._extensionUri, 'media', 'reset.css');
|
||||
|
||||
Reference in New Issue
Block a user