mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -05:00
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:
@@ -12,13 +12,13 @@ import {
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { ComponentBase } from 'sql/workbench/browser/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/workbench/browser/modelComponents/interfaces';
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/workbench/browser/modelComponents/interfaces';
|
||||
import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
@Component({
|
||||
selector: 'modelview-text',
|
||||
template: `
|
||||
<p [style.width]="getWidth()" [innerHTML]="getValue()" [ngStyle]="this.CSSStyles"></p>`
|
||||
<p [style.width]="getWidth()" [innerHTML]="getValue()" [ngStyle]="this.CSSStyles" (click)="onClick()"></p>`
|
||||
})
|
||||
export default class TextComponent extends ComponentBase implements IComponent, OnDestroy, AfterViewInit {
|
||||
@Input() descriptor: IComponentDescriptor;
|
||||
@@ -69,4 +69,11 @@ export default class TextComponent extends ComponentBase implements IComponent,
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
private onClick() {
|
||||
this.fireEvent({
|
||||
eventType: ComponentEventType.onDidClick,
|
||||
args: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user