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