Kaynağa Gözat

Fixes incorrect value for WebviewIds & adds usages

main
Eric Amodio 1 yıl önce
ebeveyn
işleme
d75d54a61d
3 değiştirilmiş dosya ile 6 ekleme ve 10 silme
  1. +1
    -1
      src/constants.ts
  2. +2
    -6
      src/eventBus.ts
  3. +3
    -3
      src/system/webview.ts

+ 1
- 1
src/constants.ts Dosyayı Görüntüle

@ -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 Dosyayı Görüntüle

@ -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 Dosyayı Görüntüle

@ -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;
}

Yükleniyor…
İptal
Kaydet