Use a different config name for connection sorting (#15275)

* use a different sort config name
This commit is contained in:
Hai Cao
2021-04-29 10:52:35 -07:00
committed by GitHub
parent ddf092462d
commit a0bf5df79d
3 changed files with 19 additions and 19 deletions

View File

@@ -11,7 +11,7 @@ import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/co
import { DataExplorerContainerExtensionHandler } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerExtensionPoint';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { DataExplorerViewletViewsContribution } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
import { GROUPS_CONFIG_KEY, CONNECTIONS_CONFIG_KEY, CONNECTIONS_SORT_BY_CONFIG_KEY, ConnectionsSortBy } from 'sql/platform/connection/common/connectionConfig';
import { GROUPS_CONFIG_KEY, CONNECTIONS_CONFIG_KEY, CONNECTIONS_SORT_BY_CONFIG_KEY, ConnectionsSortOrder } from 'sql/platform/connection/common/connectionConfig';
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
workbenchRegistry.registerWorkbenchContribution(DataExplorerViewletViewsContribution, LifecyclePhase.Starting);
@@ -33,13 +33,13 @@ configurationRegistry.registerConfiguration({
},
[CONNECTIONS_SORT_BY_CONFIG_KEY]: {
'type': 'string',
'enum': [ConnectionsSortBy.dateAdded, ConnectionsSortBy.displayName],
'enum': [ConnectionsSortOrder.dateAdded, ConnectionsSortOrder.displayName],
'enumDescriptions': [
localize('connections.sortBy.dateAdded', 'Saved connections are sorted by the dates they were added.'),
localize('connections.sortBy.displayName', 'Saved connections are sorted by their display names alphabetically.')
localize('connectionsSortOrder.dateAdded', 'Saved connections are sorted by the dates they were added.'),
localize('connectionsSortOrder.displayName', 'Saved connections are sorted by their display names alphabetically.')
],
'default': ConnectionsSortBy.dateAdded,
'description': localize('datasource.connections.sortBy', "Order used for sorting saved connections and connection groups")
'default': ConnectionsSortOrder.dateAdded,
'description': localize('datasource.connectionsSortOrder', "Controls sorting order of saved connections and connection groups.")
}
}
});