Update extension.js

This commit is contained in:
ErikrafT 2025-05-03 19:42:38 -03:00 committed by GitHub
parent 52694c2810
commit b546930218
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 10 deletions

View File

@ -10,7 +10,7 @@ function activate(context) {
// Registrar o provedor de visualização
const viewProvider = new ErikrafTDropViewProvider(context.extensionPath);
context.subscriptions.push(
vscode.window.registerWebviewViewProvider('erikraftDropView', viewProvider)
vscode.window.registerWebviewViewProvider('erikraftDrop.view', viewProvider)
);
context.subscriptions.push(disposable);
@ -34,11 +34,8 @@ class ErikrafTDropViewProvider {
}
getWebviewContent(webview) {
const darkIconPath = webview.asWebviewUri(vscode.Uri.file(
path.join(this.extensionPath, 'images', 'ui-icon-dark.svg')
));
const lightIconPath = webview.asWebviewUri(vscode.Uri.file(
path.join(this.extensionPath, 'images', 'ui-icon-light.svg')
const iconPath = webview.asWebviewUri(vscode.Uri.file(
path.join(this.extensionPath, 'images', 'icon.png')
));
return `
@ -88,10 +85,7 @@ class ErikrafTDropViewProvider {
</head>
<body>
<div class="icon-container">
<picture>
<source srcset="${darkIconPath}" media="(prefers-color-scheme: dark)" />
<img src="${lightIconPath}" alt="ErikrafT Drop Icon" />
</picture>
<img src="${iconPath}" alt="ErikrafT Drop Icon" />
</div>
<iframe