Expose Settings in Hosted Mode (#660)

This commit is contained in:
Steve Faulkner 2021-04-13 18:13:24 -05:00 committed by GitHub
parent d90a065e63
commit d96cecdfe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 15 deletions

View File

@ -1014,7 +1014,7 @@ export default class Explorer {
// Facade // Facade
public provideFeedbackEmail = () => { public provideFeedbackEmail = () => {
window.open(Constants.Urls.feedbackEmail, "_self"); window.open(Constants.Urls.feedbackEmail, "_blank");
}; };
public async getArcadiaToken(): Promise<string> { public async getArcadiaToken(): Promise<string> {

View File

@ -154,25 +154,18 @@ export function createContextCommandBarButtons(container: Explorer): CommandButt
} }
export function createControlCommandBarButtons(container: Explorer): CommandButtonComponentProps[] { export function createControlCommandBarButtons(container: Explorer): CommandButtonComponentProps[] {
const buttons: CommandButtonComponentProps[] = []; const buttons: CommandButtonComponentProps[] = [
if (configContext.platform === Platform.Hosted) { {
return buttons;
}
if (!container.isPreferredApiCassandra()) {
const label = "Settings";
const settingsPaneButton: CommandButtonComponentProps = {
iconSrc: SettingsIcon, iconSrc: SettingsIcon,
iconAlt: label, iconAlt: "Settings",
onCommandClick: () => container.openSettingPane(), onCommandClick: () => container.openSettingPane(),
commandButtonLabel: undefined, commandButtonLabel: undefined,
ariaLabel: label, ariaLabel: "Settings",
tooltipText: label, tooltipText: "Settings",
hasPopup: true, hasPopup: true,
disabled: false, disabled: false,
}; },
buttons.push(settingsPaneButton); ];
}
if (container.isHostedDataExplorerEnabled()) { if (container.isHostedDataExplorerEnabled()) {
const label = "Open Full Screen"; const label = "Open Full Screen";