## 1.122.0
This commit is contained in:
parent
71219673e5
commit
47d3a22371
@ -239,4 +239,10 @@ None
|
||||
## 1.121.0 1744403802837 = 638800006028370000 = 2025-1.Spring = Fri Apr 11 2025 13:36:42 GMT-0700 (Mountain Standard Time)
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Extenion logo
|
||||
- Extension logo
|
||||
|
||||
## 1.122.0 1744403802837 = 638800006028370000 = 2025-1.Spring = Fri Apr 11 2025 13:36:42 GMT-0700 (Mountain Standard Time)
|
||||
-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Extension to javascript communication
|
||||
- cod-1-122-0.js
|
||||
|
@ -8,7 +8,8 @@ $(document).ready(function () {
|
||||
const signalRUrl = baseUri + '/signalr';
|
||||
const workItems = {
|
||||
a: baseUri + '/markdown/bugs-features-with-parents.json?v=2025-04-10-15-59',
|
||||
b: baseUri + '/markdown/{[]}.json?v=2025-04-10-15-59'
|
||||
b: baseUri + '/markdown/{[]}.json?v=2025-04-10-15-59',
|
||||
timeout: 3000,
|
||||
};
|
||||
const b = {
|
||||
page: 'business',
|
||||
|
@ -354,5 +354,5 @@
|
||||
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\"",
|
||||
"webpack": "webpack --config ./build/node-extension.webpack.config.js"
|
||||
},
|
||||
"version": "1.121.0"
|
||||
"version": "1.122.0"
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
import * as vscode from "vscode";
|
||||
import { getNonce } from "./getNonce";
|
||||
import { apiBaseUrl } from "./constants";
|
||||
import { PostMessage } from "./PostMessage";
|
||||
import { title } from "process";
|
||||
|
||||
export class WebviewPanelCostOfDelay {
|
||||
/**
|
||||
@ -78,18 +76,21 @@ export class WebviewPanelCostOfDelay {
|
||||
// This happens when the user closes the panel or when the panel is closed programmatically
|
||||
this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
|
||||
|
||||
// // Handle messages from the webview
|
||||
// this._panel.webview.onDidReceiveMessage(
|
||||
// (message) => {
|
||||
// switch (message.command) {
|
||||
// case "alert":
|
||||
// vscode.window.showErrorMessage(message.text);
|
||||
// return;
|
||||
// }
|
||||
// },
|
||||
// null,
|
||||
// this._disposables
|
||||
// );
|
||||
// Handle messages from the webview
|
||||
this._panel.webview.onDidReceiveMessage(
|
||||
(message) => {
|
||||
switch (message.command) {
|
||||
case "alert":
|
||||
vscode.window.showErrorMessage(message.text);
|
||||
return;
|
||||
default:
|
||||
vscode.window.showErrorMessage(message.text);
|
||||
break;
|
||||
}
|
||||
},
|
||||
null,
|
||||
this._disposables
|
||||
);
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
@ -108,29 +109,18 @@ export class WebviewPanelCostOfDelay {
|
||||
|
||||
private async _update(site: string, title: string, view: string) {
|
||||
const webview = this._panel.webview;
|
||||
|
||||
this._panel.webview.html = this._getHtmlForWebview(site, title, view, webview);
|
||||
webview.onDidReceiveMessage(async (postMessage: PostMessage) => {
|
||||
switch (postMessage.type) {
|
||||
case "on-info":
|
||||
if (!postMessage.value)
|
||||
return;
|
||||
vscode.window.showInformationMessage(postMessage.value);
|
||||
break;
|
||||
case "on-error":
|
||||
if (!postMessage.value)
|
||||
return;
|
||||
vscode.window.showErrorMessage(postMessage.value);
|
||||
break;
|
||||
default:
|
||||
vscode.window.showErrorMessage(postMessage.type);
|
||||
break;
|
||||
}
|
||||
webview.onDidReceiveMessage(async (message: string) => {
|
||||
vscode.window.showErrorMessage(message);
|
||||
});
|
||||
}
|
||||
|
||||
private _getHtmlForWebview(site: string, title: string, view: string, webview: vscode.Webview) {
|
||||
const baseUri = 'https://eaf-dev.mes.infineon.com';
|
||||
const scriptUri = 'cod-1-122-0.js?v=2025-04-14-08-10';
|
||||
|
||||
// Use a nonce to only allow a specific script to be run.
|
||||
const nonce = getNonce();
|
||||
|
||||
if (view === 'HTML') {
|
||||
return `<!DOCTYPE html>
|
||||
@ -163,9 +153,6 @@ export class WebviewPanelCostOfDelay {
|
||||
vscode.Uri.joinPath(this._extensionContext.extensionUri, "media", "cost-of-delay.js")
|
||||
);
|
||||
|
||||
// Use a nonce to only allow a specific script to be run.
|
||||
const nonce = getNonce();
|
||||
|
||||
return `<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@ -178,7 +165,7 @@ export class WebviewPanelCostOfDelay {
|
||||
<script nonce="${nonce}" src="${scriptJQueryUri}"></script>
|
||||
<script nonce="${nonce}" src="${scriptSignalRUri}"></script>
|
||||
<script nonce="${nonce}" src="${baseUri}/signalr/hubs"></script>
|
||||
<script nonce="${nonce}" src="${baseUri}/js/cod-b.js?v=2025-01-22-10-49" type="text/javascript"></script>
|
||||
<script nonce="${nonce}" src="${baseUri}/js/${scriptUri}" type="text/javascript"></script>
|
||||
<script nonce="${nonce}">
|
||||
const _webviewSite = '${site}';
|
||||
const _webviewView = '${view}';
|
||||
|
Loading…
x
Reference in New Issue
Block a user