From d96cecdfe8c47c050504445ac628033a77ff90a7 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Tue, 13 Apr 2021 18:13:24 -0500 Subject: [PATCH] Expose Settings in Hosted Mode (#660) --- src/Explorer/Explorer.tsx | 2 +- .../CommandBarComponentButtonFactory.tsx | 21 +++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/Explorer/Explorer.tsx b/src/Explorer/Explorer.tsx index 22a0da29b..802970b43 100644 --- a/src/Explorer/Explorer.tsx +++ b/src/Explorer/Explorer.tsx @@ -1014,7 +1014,7 @@ export default class Explorer { // Facade public provideFeedbackEmail = () => { - window.open(Constants.Urls.feedbackEmail, "_self"); + window.open(Constants.Urls.feedbackEmail, "_blank"); }; public async getArcadiaToken(): Promise { diff --git a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx index 2221e21fc..fcb380fe4 100644 --- a/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx +++ b/src/Explorer/Menus/CommandBar/CommandBarComponentButtonFactory.tsx @@ -154,25 +154,18 @@ export function createContextCommandBarButtons(container: Explorer): CommandButt } export function createControlCommandBarButtons(container: Explorer): CommandButtonComponentProps[] { - const buttons: CommandButtonComponentProps[] = []; - if (configContext.platform === Platform.Hosted) { - return buttons; - } - - if (!container.isPreferredApiCassandra()) { - const label = "Settings"; - const settingsPaneButton: CommandButtonComponentProps = { + const buttons: CommandButtonComponentProps[] = [ + { iconSrc: SettingsIcon, - iconAlt: label, + iconAlt: "Settings", onCommandClick: () => container.openSettingPane(), commandButtonLabel: undefined, - ariaLabel: label, - tooltipText: label, + ariaLabel: "Settings", + tooltipText: "Settings", hasPopup: true, disabled: false, - }; - buttons.push(settingsPaneButton); - } + }, + ]; if (container.isHostedDataExplorerEnabled()) { const label = "Open Full Screen";