Skip to content

Commit

Permalink
Merge pull request #41 from naqibam/main
Browse files Browse the repository at this point in the history
Added custom icon to the webview panel tab
  • Loading branch information
Villy-P authored Feb 11, 2025
2 parents 5246381 + 52b8de6 commit e4d03ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Upcoming

- Added custom icon to the webview panel tab

### Added

- Added `app` id tag to `body` element
Expand Down
5 changes: 4 additions & 1 deletion src/extension/extension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { commands, ExtensionContext } from "vscode";
import { SveltePanel } from "./panel";
import * as vscode from 'vscode'
import * as vscode from 'vscode';
import path from 'path';
import fs from 'fs';
import dirTree from 'directory-tree'
Expand All @@ -19,6 +19,9 @@ function setupExtension(context: ExtensionContext) {
export function activate(context: ExtensionContext) {
const showHelloWorldCommand = commands.registerCommand("file-makeup-viewer.show-makeup", () => {
SveltePanel.render('showPanel', 'File Makeup', context.extensionUri);
if (SveltePanel.currentPanel) {
SveltePanel.currentPanel.panel.iconPath = vscode.Uri.joinPath(context.extensionUri, 'assets', 'pie-chart-683.png');
}
SveltePanel.currentPanel?.panel.onDidChangeViewState(e => {
setupExtension(context);
}, null, context.subscriptions)
Expand Down

0 comments on commit e4d03ef

Please sign in to comment.