mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
only handle connection profile (#16790)
This commit is contained in:
@@ -318,10 +318,12 @@ export class ConnectionDialogWidget extends Modal {
|
|||||||
const divContainer = DOM.append(recentConnectionContainer, DOM.$('.server-explorer-viewlet'));
|
const divContainer = DOM.append(recentConnectionContainer, DOM.$('.server-explorer-viewlet'));
|
||||||
const treeContainer = DOM.append(divContainer, DOM.$('.explorer-servers'));
|
const treeContainer = DOM.append(divContainer, DOM.$('.explorer-servers'));
|
||||||
const leftClick = (element: any, eventish: ICancelableEvent, origin: string) => {
|
const leftClick = (element: any, eventish: ICancelableEvent, origin: string) => {
|
||||||
// element will be a server group if the tree is clicked rather than a item
|
// element will be a server group if the blank area of the tree is clicked, we should only proceed is a connection profile is selected.
|
||||||
|
if (element instanceof ConnectionProfile) {
|
||||||
const isDoubleClick = origin === 'mouse' && (eventish as MouseEvent).detail === 2;
|
const isDoubleClick = origin === 'mouse' && (eventish as MouseEvent).detail === 2;
|
||||||
this._connectionSource = 'recent';
|
this._connectionSource = 'recent';
|
||||||
this.onConnectionClick(element, isDoubleClick);
|
this.onConnectionClick(element, isDoubleClick);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const actionProvider = this.instantiationService.createInstance(RecentConnectionActionsProvider);
|
const actionProvider = this.instantiationService.createInstance(RecentConnectionActionsProvider);
|
||||||
const controller = new RecentConnectionTreeController(leftClick, actionProvider, this.connectionManagementService, this.contextMenuService);
|
const controller = new RecentConnectionTreeController(leftClick, actionProvider, this.connectionManagementService, this.contextMenuService);
|
||||||
|
|||||||
Reference in New Issue
Block a user