Przeglądaj źródła

Updates option naming

main
Eric Amodio 1 rok temu
rodzic
commit
2ce6ffe802
7 zmienionych plików z 14 dodań i 14 usunięć
  1. +1
    -1
      src/plus/webviews/focus/registration.ts
  2. +1
    -1
      src/plus/webviews/graph/registration.ts
  3. +1
    -1
      src/plus/webviews/timeline/registration.ts
  4. +1
    -1
      src/webviews/settings/registration.ts
  5. +1
    -1
      src/webviews/webviewController.ts
  6. +8
    -8
      src/webviews/webviewsController.ts
  7. +1
    -1
      src/webviews/welcome/registration.ts

+ 1
- 1
src/plus/webviews/focus/registration.ts Wyświetl plik

@ -15,7 +15,7 @@ export function registerFocusWebviewPanel(controller: WebviewsController) {
trackingFeature: 'focusWebview',
plusFeature: true,
column: ViewColumn.Active,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: true,
enableFindWidget: true,
},

+ 1
- 1
src/plus/webviews/graph/registration.ts Wyświetl plik

@ -24,7 +24,7 @@ export function registerGraphWebviewPanel(controller: WebviewsController) {
trackingFeature: 'graphWebview',
plusFeature: true,
column: ViewColumn.Active,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: true,
enableFindWidget: false,
},

+ 1
- 1
src/plus/webviews/timeline/registration.ts Wyświetl plik

@ -15,7 +15,7 @@ export function registerTimelineWebviewPanel(controller: WebviewsController) {
trackingFeature: 'timelineWebview',
plusFeature: true,
column: ViewColumn.Active,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: true,
enableFindWidget: false,
},

+ 1
- 1
src/webviews/settings/registration.ts Wyświetl plik

@ -16,7 +16,7 @@ export function registerSettingsWebviewPanel(controller: WebviewsController) {
trackingFeature: 'settingsWebview',
plusFeature: false,
column: ViewColumn.Beside,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: false,
enableFindWidget: true,
},

+ 1
- 1
src/webviews/webviewController.ts Wyświetl plik

@ -147,7 +147,7 @@ export class WebviewController<
public readonly parent: GetParentType<Descriptor>,
resolveProvider: (
container: Container,
host: WebviewController<State, SerializedState>,
controller: WebviewController<State, SerializedState>,
) => Promise<WebviewProvider<State, SerializedState>>,
) {
this.id = descriptor.id;

+ 8
- 8
src/webviews/webviewsController.ts Wyświetl plik

@ -23,8 +23,8 @@ export interface WebviewPanelDescriptor {
readonly trackingFeature: TrackedUsageFeatures;
readonly plusFeature: boolean;
readonly column?: ViewColumn;
readonly options?: WebviewOptions;
readonly panelOptions?: WebviewPanelOptions;
readonly webviewOptions?: WebviewOptions;
readonly webviewPanelOptions?: WebviewPanelOptions;
}
interface WebviewPanelRegistration<State, SerializedState = State> {
@ -48,7 +48,7 @@ export interface WebviewViewDescriptor {
readonly contextKeyPrefix: `gitlens:webviewView:${WebviewViewIds}`;
readonly trackingFeature: TrackedUsageFeatures;
readonly plusFeature: boolean;
readonly options?: WebviewOptions;
readonly webviewOptions?: WebviewOptions;
readonly webviewViewOptions?: {
readonly retainContextWhenHidden?: boolean;
};
@ -83,7 +83,7 @@ export class WebviewsController implements Disposable {
descriptor: WebviewViewDescriptor,
resolveProvider: (
container: Container,
host: WebviewController<State, SerializedState>,
controller: WebviewController<State, SerializedState>,
) => Promise<WebviewProvider<State, SerializedState>>,
canResolveProvider?: () => boolean | Promise<boolean>,
): WebviewViewProxy {
@ -113,7 +113,7 @@ export class WebviewsController implements Disposable {
enableCommandUris: true,
enableScripts: true,
localResourceRoots: [Uri.file(this.container.context.extensionPath)],
...descriptor.options,
...descriptor.webviewOptions,
};
webviewView.title = descriptor.title;
@ -175,7 +175,7 @@ export class WebviewsController implements Disposable {
descriptor: WebviewPanelDescriptor,
resolveProvider: (
container: Container,
host: WebviewController<State, SerializedState>,
controller: WebviewController<State, SerializedState>,
) => Promise<WebviewProvider<State, SerializedState>>,
canResolveProvider?: () => boolean | Promise<boolean>,
): WebviewPanelProxy {
@ -218,8 +218,8 @@ export class WebviewsController implements Disposable {
enableScripts: true,
localResourceRoots: [Uri.file(container.context.extensionPath)],
},
...descriptor.options,
...descriptor.panelOptions,
...descriptor.webviewOptions,
...descriptor.webviewPanelOptions,
},
);
panel.iconPath = Uri.file(container.context.asAbsolutePath(descriptor.iconPath));

+ 1
- 1
src/webviews/welcome/registration.ts Wyświetl plik

@ -15,7 +15,7 @@ export function registerWelcomeWebviewPanel(controller: WebviewsController) {
trackingFeature: 'welcomeWebview',
plusFeature: false,
column: ViewColumn.Beside,
panelOptions: {
webviewPanelOptions: {
retainContextWhenHidden: false,
enableFindWidget: true,
},

Ładowanie…
Anuluj
Zapisz