Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code Web version tries to load local resource #19

Closed
AdamRaichu opened this issue Mar 23, 2023 · 0 comments · Fixed by #20
Closed

VS Code Web version tries to load local resource #19

AdamRaichu opened this issue Mar 23, 2023 · 0 comments · Fixed by #20
Labels
bug Something isn't working

Comments

@AdamRaichu
Copy link
Contributor

Describe the bug

When using in vscode.dev,

To Reproduce
Steps to reproduce the behavior:

  1. Open AdamRaichu/vscode-zip-viewer in vscode.dev. here
  2. Open the GitHub Actions view.
  3. Under the "WORKFLOWS" tab, expand "Publish Extension".
  4. The icons do not load.

Expected behavior

The icons should have loaded.

Screenshots
If applicable, add screenshots to help explain your problem.

image

Extension Version
v1.25.1

Additional context
The following errors were generated by the console following the steps above.

Not allowed to load local resource: file:///GitHub/vscode-github-actions/0.25.1/extension/resources/icons/dark/workflowruns/wr_success.svg
Not allowed to load local resource: file:///GitHub/vscode-github-actions/0.25.1/extension/resources/icons/dark/workflowruns/wr_failure.svg

I believe this error was caused by the method used to generate the icon paths. Perhaps using vscode.Uri.joinPath(extensionUri, "resources", "icons", "light OR dark", relativeIconPath) would work better.

export function getAbsoluteIconPath(relativeIconPath: string): {
light: string | vscode.Uri;
dark: string | vscode.Uri;
} {
return {
light: _context.asAbsolutePath(`resources/icons/light/${relativeIconPath}`),
dark: _context.asAbsolutePath(`resources/icons/dark/${relativeIconPath}`)
};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant