mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
amend
This commit is contained in:
parent
38662d2824
commit
f56772a07a
4 changed files with 6 additions and 8 deletions
|
|
@ -11,7 +11,7 @@
|
|||
"Other"
|
||||
],
|
||||
"activationEvents": [],
|
||||
"main": "./out/extension.js",
|
||||
"main": "./out/extension/extension.js",
|
||||
"contributes": {
|
||||
"configuration": {
|
||||
"title": "Void",
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ function generateNonce() {
|
|||
|
||||
|
||||
// call this when you have access to the webview to set its html
|
||||
export const updateWebviewHTML = (webview: vscode.Webview, extensionUri: vscode.Uri, { jsLocation, cssLocation }: { jsLocation: string, cssLocation: string }) => {
|
||||
export const updateWebviewHTML = (webview: vscode.Webview, extensionUri: vscode.Uri, { jsOutLocation, cssOutLocation }: { jsOutLocation: string, cssOutLocation: string }) => {
|
||||
|
||||
// 'dist/sidebar/index.js'
|
||||
// 'dist/sidebar/styles.css'
|
||||
|
||||
const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, jsLocation));
|
||||
const stylesUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, cssLocation));
|
||||
const scriptUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, jsOutLocation));
|
||||
const stylesUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, cssOutLocation));
|
||||
const rootUri = webview.asWebviewUri(vscode.Uri.joinPath(extensionUri));
|
||||
const nonce = generateNonce();
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,10 @@ export class CtrlKWebviewProvider {
|
|||
constructor(context: vscode.ExtensionContext) {
|
||||
this._extensionUri = context.extensionUri
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// called by us
|
||||
updateWebviewHTML(webview: vscode.Webview) {
|
||||
_updateWebviewHTML(webview, this._extensionUri, { jsLocation: 'dist/webviews/ctrlk/index.js', cssLocation: 'dist/webviews/styles.css' })
|
||||
_updateWebviewHTML(webview, this._extensionUri, { jsOutLocation: 'dist/webviews/ctrlk/index.js', cssOutLocation: 'dist/webviews/styles.css' })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export class SidebarWebviewProvider implements vscode.WebviewViewProvider {
|
|||
|
||||
// called by us
|
||||
updateWebviewHTML(webview: vscode.Webview) {
|
||||
_updateWebviewHTML(webview, this._extensionUri, { jsLocation: 'dist/webviews/sidebar/index.js', cssLocation: 'dist/webviews/styles.css' })
|
||||
_updateWebviewHTML(webview, this._extensionUri, { jsOutLocation: 'dist/webviews/sidebar/index.js', cssOutLocation: 'dist/webviews/styles.css' })
|
||||
}
|
||||
|
||||
// called internally by vscode
|
||||
|
|
|
|||
Loading…
Reference in a new issue