Make sql master link clickable that opens connection (#6982)

* Make sql master link clickable that opens connection

* Improve comments and fix break

* Show error message if failed to connect and clear username

* Remove key handler - text doesn't even get focus currently so this isn't doing anything
This commit is contained in:
Charles Gagnon
2019-08-27 17:39:05 -07:00
committed by GitHub
parent 4e25bc9396
commit 99350210d7
5 changed files with 74 additions and 5 deletions

View File

@@ -693,7 +693,6 @@ class CardWrapper extends ComponentWrapper implements azdata.CardComponent {
super(proxy, handle, ModelComponentTypes.Card, id);
this.properties = {};
this._emitterMap.set(ComponentEventType.onDidClick, new Emitter<any>());
this._emitterMap.set(ComponentEventType.onDidClick, new Emitter<any>());
}
public get label(): string {
@@ -1103,6 +1102,7 @@ class TextComponentWrapper extends ComponentWrapper implements azdata.TextCompon
constructor(proxy: MainThreadModelViewShape, handle: number, id: string) {
super(proxy, handle, ModelComponentTypes.Text, id);
this.properties = {};
this._emitterMap.set(ComponentEventType.onDidClick, new Emitter<any>());
}
public get value(): string {
@@ -1111,6 +1111,11 @@ class TextComponentWrapper extends ComponentWrapper implements azdata.TextCompon
public set value(v: string) {
this.setProperty('value', v);
}
public get onDidClick(): vscode.Event<any> {
let emitter = this._emitterMap.get(ComponentEventType.onDidClick);
return emitter && emitter.event;
}
}
class TableComponentWrapper extends ComponentWrapper implements azdata.TableComponent {