Add worksapce platform keys

This commit is contained in:
Jackson Kearl
2021-08-23 20:22:58 -07:00
parent 66223aae68
commit b7d400880a
4 changed files with 42 additions and 5 deletions

View File

@ -0,0 +1,9 @@
# Hello Web Users
[Say hello](command:getting-started-sample.sayHello)
![Small Image](./small-image.png)
```ts
const a = 12;
```

View File

@ -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" }
}
]
}

View File

@ -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');