瀏覽代碼

Fixes incorrect value for WebviewIds & adds usages

main
Eric Amodio 1 年之前
父節點
當前提交
d75d54a61d
共有 3 個文件被更改,包括 6 次插入10 次删除
  1. +1
    -1
      src/constants.ts
  2. +2
    -6
      src/eventBus.ts
  3. +3
    -3
      src/system/webview.ts

+ 1
- 1
src/constants.ts 查看文件

@ -457,7 +457,7 @@ export type TreeViewTypes =
export type TreeViewIds = `gitlens.views.${TreeViewTypes}`;
export type WebviewTypes = 'graph' | 'settings' | 'timeline' | 'welcome' | 'focus';
export type WebviewIds = `gitlens.views.${WebviewTypes}`;
export type WebviewIds = `gitlens.${WebviewTypes}`;
export type WebviewViewTypes = 'account' | 'commitDetails' | 'graph' | 'graphDetails' | 'home' | 'timeline';
export type WebviewViewIds = `gitlens.views.${WebviewViewTypes}`;

+ 2
- 6
src/eventBus.ts 查看文件

@ -1,7 +1,7 @@
import type { Disposable, Uri } from 'vscode';
import { EventEmitter } from 'vscode';
import type { ViewsConfigKeys } from './config';
import type { CustomEditorTypes, WebviewTypes, WebviewViewTypes } from './constants';
import type { CustomEditorIds, WebviewIds, WebviewViewIds } from './constants';
import type { GitCaches } from './git/gitProvider';
import type { GitCommit } from './git/models/commit';
import type { GitRevisionReference } from './git/models/reference';
@ -39,11 +39,7 @@ interface EventBusEvent {
source?: EventBusSource | undefined;
}
export type EventBusSource =
| `gitlens.${CustomEditorTypes}`
| `gitlens.${WebviewTypes}`
| `gitlens.views.${WebviewViewTypes}`
| `gitlens.views.${ViewsConfigKeys}`;
export type EventBusSource = CustomEditorIds | WebviewIds | WebviewViewIds | `gitlens.views.${ViewsConfigKeys}`;
export type EventBusOptions = {
source?: EventBusSource;

+ 3
- 3
src/system/webview.ts 查看文件

@ -1,7 +1,7 @@
import type { WebviewTypes, WebviewViewTypes } from '../constants';
import type { WebviewIds, WebviewViewIds } from '../constants';
export interface WebviewItemContext<TValue = unknown> {
webview?: `gitlens.${WebviewTypes}` | `gitlens.views.${WebviewViewTypes}`;
webview?: WebviewIds | WebviewViewIds;
webviewItem: string;
webviewItemValue: TValue;
}
@ -15,7 +15,7 @@ export function isWebviewItemContext(
}
export interface WebviewItemGroupContext<TValue = unknown> {
webview?: `gitlens.${WebviewTypes}` | `gitlens.views.${WebviewViewTypes}`;
webview?: WebviewIds | WebviewViewIds;
webviewItemGroup: string;
webviewItemGroupValue: TValue;
}

Loading…
取消
儲存