Skip to content

Commit 21a8452

Browse files
committed
added favicon of logo to webview
1 parent aeccbf3 commit 21a8452

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

media/favicon.ico

15 KB
Binary file not shown.

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@
4545
"name": "Test"
4646
}
4747
]
48-
}
48+
},
49+
"viewsWelcome": [
50+
{
51+
"view": "metrics-file",
52+
"contents": "View tree to see where improvements can be made!\n[View Tree](command:myExtension.showPanel)\n"
53+
}
54+
]
4955
},
5056
"scripts": {
5157
"lint": "eslint .",

src/panel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ function createPanel(context) {
88
// create one new tab
99
vscode.ViewColumn.One,
1010
{
11-
enableScripts: true
11+
enableScripts: true,
12+
retainContextWhenHidden: true
1213
}
1314
);
1415

16+
panel.iconPath = vscode.Uri.joinPath(context.extensionUri, 'media', 'favicon.ico');
17+
1518
const bundlePath = vscode.Uri.joinPath(context.extensionUri, 'build', 'bundle.js');
1619

1720
// set webview URI to pass into html script
1821
const bundleURI = panel.webview.asWebviewUri(bundlePath);
1922

20-
2123
// render html of webview here
2224
panel.webview.html = createWebviewHTML(bundleURI);
2325
}

0 commit comments

Comments
 (0)