mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Add WebviewView.description
Allow configuring the description for webview views. This is rendered next to the title in a less prominently in the title
This commit is contained in:
@@ -23,6 +23,7 @@ class ExtHostWebviewView extends Disposable implements vscode.WebviewView {
|
||||
#isDisposed = false;
|
||||
#isVisible: boolean;
|
||||
#title: string | undefined;
|
||||
#description: string | undefined;
|
||||
|
||||
constructor(
|
||||
handle: extHostProtocol.WebviewHandle,
|
||||
@@ -70,6 +71,19 @@ class ExtHostWebviewView extends Disposable implements vscode.WebviewView {
|
||||
}
|
||||
}
|
||||
|
||||
public get description(): string | undefined {
|
||||
this.assertNotDisposed();
|
||||
return this.#description;
|
||||
}
|
||||
|
||||
public set description(value: string | undefined) {
|
||||
this.assertNotDisposed();
|
||||
if (this.#description !== value) {
|
||||
this.#description = value;
|
||||
this.#proxy.$setWebviewViewDescription(this.#handle, value);
|
||||
}
|
||||
}
|
||||
|
||||
public get visible(): boolean { return this.#isVisible; }
|
||||
|
||||
public get webview(): vscode.Webview { return this.#webview; }
|
||||
|
||||
Reference in New Issue
Block a user