Skip to content

Commit

Permalink
Merge pull request #23 from Jeehunter/jeehunter
Browse files Browse the repository at this point in the history
 fix:change registerProjectwizard iconPath to Uri
  • Loading branch information
yeweiasia authored Apr 23, 2023
2 parents 353ada4 + 4075809 commit 00577e2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"codearts",
"plugin"
],
"version": "0.4.8",
"version": "0.4.9",
"license": "SEE LICENSE IN LICENSE",
"description": "core plugin api of cloudide frontend and backend",
"repository": {
Expand Down
10 changes: 9 additions & 1 deletion src/node/plugin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,17 @@ export class Plugin {
public registerProjectWizardProvider(opts: WebviewOptions): cloudide.Disposable | undefined {
const provider = new BaseWebviewDialogProvider(this.context, opts);
let disposable = undefined;
const iconPath = opts.iconPath
? cloudide.Uri.file(
path.join(
this.context.extensionPath,
typeof opts.iconPath === 'object' ? opts.iconPath.light : opts.iconPath
)
)
: undefined;
try {
disposable = (cloudide as any).window.registerProjectWizardProvider(opts.viewType, opts.title, provider, {
iconPath: opts.iconPath
iconPath
});
} catch (e) {
this.log(LogLevel.ERROR, (<any>e).message);
Expand Down

0 comments on commit 00577e2

Please sign in to comment.