Skip to content

Commit

Permalink
Merge pull request #24 from Jeehunter/jeehunter
Browse files Browse the repository at this point in the history
feat:The index of the WebView in TabViewPane.
  • Loading branch information
yeweiasia authored Apr 28, 2023
2 parents 00577e2 + 2dbffaf commit cd487fd
Show file tree
Hide file tree
Showing 4 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.9",
"version": "0.5.0",
"license": "SEE LICENSE IN LICENSE",
"description": "core plugin api of cloudide frontend and backend",
"repository": {
Expand Down
7 changes: 7 additions & 0 deletions src/common/plugin-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ export interface WebviewOptions {
* l10n stores all locialization items of specific locale
*/
templateEngine?: 'ejs' | 'pug';

/**
* The index of the webview in the TabViewPane,The value ranges from 0 to 2^32-2.
* Sort from min to max.
* If not defined, sort to the end.
*/
index?: number;
}

export enum EventType {
Expand Down
3 changes: 2 additions & 1 deletion src/node/plugin-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ export class Plugin {
: undefined;
try {
disposable = (cloudide as any).window.registerProjectWizardProvider(opts.viewType, opts.title, provider, {
iconPath
iconPath,
index: opts.index
});
} catch (e) {
this.log(LogLevel.ERROR, (<any>e).message);
Expand Down

0 comments on commit cd487fd

Please sign in to comment.