Update server tree action contributions (#15525)

* Update server tree action contributions

* Fix test
This commit is contained in:
Charles Gagnon
2021-05-20 12:41:56 -07:00
committed by GitHub
parent c61c53976a
commit 2ec720d5b9
19 changed files with 176 additions and 213 deletions

View File

@@ -3,6 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AddServerAction } from 'sql/workbench/services/objectExplorer/browser/connectionTreeAction';
import { escape } from 'vs/base/common/strings';
import { localize } from 'vs/nls';
@@ -37,7 +38,7 @@ export default () => `
</div>
<div class="row header-bottom-nav-tiles ads-grid">
<div class="col">
<a role="button" class="header-bottom-nav-tile-link ads-welcome-page-link" href="command:registeredServers.addConnection">
<a role="button" class="header-bottom-nav-tile-link ads-welcome-page-link" href="command:${AddServerAction.ID}">
<div class="header-bottom-nav-tile tile tile-connection">
<h3>${escape(localize('welcomePage.createConnection', "Create a connection"))}</h3>
<p>${escape(localize('welcomePage.createConnectionBody', "Connect to a database instance through the connection dialog."))}</p>

View File

@@ -22,8 +22,8 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { Button } from 'sql/base/browser/ui/button/button';
import { extensionsViewIcon } from 'vs/workbench/contrib/extensions/browser/extensionsIcons';
import { settingsViewBarIcon } from 'vs/workbench/browser/parts/activitybar/activitybarPart';
import { dataExplorerIconId } from 'sql/workbench/contrib/dataExplorer/browser/dataExplorerViewlet';
import { notebookIconId } from 'sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet';
import { SqlIconId } from 'sql/base/common/codicons';
const $ = dom.$;
interface TourData {
@@ -44,7 +44,7 @@ interface TourData {
popupImage: string;
}
const dataExplorerIconCssSelector = `.action-label.${dataExplorerIconId}`;
const dataExplorerIconCssSelector = `.action-label.${SqlIconId.dataExplorer}`;
const notebookIconCssSelector = `.action-label.${notebookIconId}`;
const extensionsIconCssSelector = ThemeIcon.asCSSSelector(extensionsViewIcon);
const settingsGearIconCssSelector = ThemeIcon.asCSSSelector(settingsViewBarIcon);

View File

@@ -54,6 +54,7 @@ import { ICommandAction, MenuItemAction } from 'vs/platform/actions/common/actio
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IExtensionRecommendationsService } from 'vs/workbench/services/extensionRecommendations/common/extensionRecommendations';
import { attachButtonStyler } from 'vs/platform/theme/common/styler';
import { AddServerAction } from 'sql/workbench/services/objectExplorer/browser/connectionTreeAction';
const configurationKey = 'workbench.startupEditor';
const oldConfigurationKey = 'workbench.welcome.enabled';
const telemetryFrom = 'welcomePage';
@@ -211,7 +212,7 @@ const extensionPackStrings = {
const NewActionItems: ICommandAction[] = [
{
title: localize('welcomePage.newConnection', "New connection"),
id: 'registeredServers.addConnection'
id: AddServerAction.ID
}, {
title: localize('welcomePage.newQuery', "New query"),
id: 'workbench.action.files.newUntitledFile'