Skip to content

Commit 9f22957

Browse files
committed
feat: show icon on webview panel
1 parent aa09029 commit 9f22957

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/commands/showPanel.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ export async function showPanel(context: vscode.ExtensionContext) {
105105

106106
const frontendUrl = new URL("/playground", config.frontendBaseUrl).href;
107107

108+
// equivalent to panel.webview.html = ...
108109
setWebviewContent(
109110
panel,
110111
context,
@@ -125,6 +126,12 @@ export async function showPanel(context: vscode.ExtensionContext) {
125126
></iframe>
126127
</div>,
127128
);
129+
130+
panel.iconPath = vscode.Uri.joinPath(
131+
context.extensionUri,
132+
"assets",
133+
"icon.png",
134+
);
128135
}
129136

130137
// TODO: Move this to a util file

src/utils/webview.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ export function setWebviewContent(
2323
<head>
2424
<meta charset="UTF-8">
2525
<meta name="viewport" content="width=device-width, initial-scale=1.0">
26-
<title>Cat Coding</title>
2726
</head>
2827
<body>
2928
<div id="root"></div>

0 commit comments

Comments
 (0)