mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 09:35:38 -05:00
Merge from vscode e3c4990c67c40213af168300d1cfeb71d680f877 (#16569)
This commit is contained in:
@@ -674,9 +674,9 @@ class TreeItemRenderer extends Disposable implements ITreeRenderer<ITreeItemFrom
|
||||
if (iconUrl || sqlIcon) {
|
||||
templateData.icon.className = 'custom-view-tree-node-item-icon';
|
||||
if (sqlIcon) {
|
||||
DOM.toggleClass(templateData.icon, sqlIcon, !!sqlIcon); // tracked change
|
||||
templateData.icon.classList.toggle(sqlIcon, !!sqlIcon); // tracked change
|
||||
}
|
||||
DOM.toggleClass(templateData.icon, 'icon', !!sqlIcon);
|
||||
templateData.icon.classList.toggle('icon', !!sqlIcon);
|
||||
templateData.icon.style.backgroundImage = iconUrl ? DOM.asCSSUrl(iconUrl) : '';
|
||||
} else {
|
||||
let iconClass: string | undefined;
|
||||
|
||||
@@ -17,7 +17,6 @@ import { ConnectionWidget } from 'sql/workbench/services/connection/browser/conn
|
||||
import { IServerGroupController } from 'sql/platform/serverGroup/common/serverGroupController';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { ConnectionProviderProperties } from 'sql/platform/capabilities/common/capabilitiesService';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
|
||||
export class ConnectionController implements IConnectionComponentController {
|
||||
private _advancedController: AdvancedPropertiesController;
|
||||
@@ -153,7 +152,7 @@ export class ConnectionController implements IConnectionComponentController {
|
||||
} else {
|
||||
defaultGroupId = Utils.defaultGroupId;
|
||||
}
|
||||
allGroups.push(assign({}, this._connectionWidget.DefaultServerGroup, { id: defaultGroupId }));
|
||||
allGroups.push(Object.assign({}, this._connectionWidget.DefaultServerGroup, { id: defaultGroupId }));
|
||||
allGroups.push(this._connectionWidget.NoneServerGroup);
|
||||
if (connectionGroupRoot && connectionGroupRoot.length > 0) {
|
||||
this.flattenGroups(connectionGroupRoot[0], allGroups);
|
||||
|
||||
@@ -45,7 +45,6 @@ import { Memento, MementoObject } from 'vs/workbench/common/memento';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { entries } from 'sql/base/common/collections';
|
||||
import { values } from 'vs/base/common/collections';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
@@ -877,7 +876,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
|
||||
// Request Senders
|
||||
private async sendConnectRequest(connection: interfaces.IConnectionProfile, uri: string): Promise<boolean> {
|
||||
let connectionInfo = assign({}, {
|
||||
let connectionInfo = Object.assign({}, {
|
||||
options: connection.options
|
||||
});
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import * as DOM from 'vs/base/browser/dom';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { OS, OperatingSystem } from 'vs/base/common/platform';
|
||||
import { MessageType } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import { endsWith, startsWith } from 'vs/base/common/strings';
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
@@ -229,7 +228,7 @@ export class ConnectionWidget extends lifecycle.Disposable {
|
||||
validation: (value: string) => {
|
||||
if (!value) {
|
||||
return ({ type: MessageType.ERROR, content: localize('connectionWidget.missingRequireField', "{0} is required.", serverNameOption.displayName) });
|
||||
} else if (startsWith(value, ' ') || endsWith(value, ' ')) {
|
||||
} else if (value.startsWith(' ') || value.endsWith(' ')) {
|
||||
return ({ type: MessageType.WARNING, content: localize('connectionWidget.fieldWillBeTrimmed', "{0} will be trimmed.", serverNameOption.displayName) });
|
||||
}
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user