From 9e4501c184617fa250e841e6ee1ec042e0274ae7 Mon Sep 17 00:00:00 2001 From: Tostti Date: Wed, 24 Jan 2024 18:34:35 -0300 Subject: [PATCH] Change help menu items --- src/core/public/chrome/chrome_service.tsx | 1 + src/core/public/chrome/ui/header/header.tsx | 2 + .../chrome/ui/header/header_help_menu.tsx | 39 ++++++++++++++----- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index f6ca2aa28089..93b554c9d3f2 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -263,6 +263,7 @@ export class ChromeService { branding={injectedMetadata.getBranding()} logos={logos} survey={injectedMetadata.getSurvey()} + darkmode={uiSettings.get('theme:darkMode')} /> ), diff --git a/src/core/public/chrome/ui/header/header.tsx b/src/core/public/chrome/ui/header/header.tsx index acc7c6869145..0f903e015795 100644 --- a/src/core/public/chrome/ui/header/header.tsx +++ b/src/core/public/chrome/ui/header/header.tsx @@ -93,6 +93,7 @@ export interface HeaderProps { branding: ChromeBranding; logos: Logos; survey: string | undefined; + darkmode: boolean; } export function Header({ @@ -238,6 +239,7 @@ export function Header({ opensearchDashboardsDocLink={opensearchDashboardsDocLink} opensearchDashboardsVersion={opensearchDashboardsVersion} surveyLink={survey} + darkmode={observables.darkmode} /> diff --git a/src/core/public/chrome/ui/header/header_help_menu.tsx b/src/core/public/chrome/ui/header/header_help_menu.tsx index 33b858177118..9681e87657fa 100644 --- a/src/core/public/chrome/ui/header/header_help_menu.tsx +++ b/src/core/public/chrome/ui/header/header_help_menu.tsx @@ -50,7 +50,6 @@ import { ExclusiveUnion } from '@elastic/eui'; import { combineLatest } from 'rxjs'; import { HeaderExtension } from './header_extension'; import { ChromeHelpExtension } from '../../chrome_service'; -import { GITHUB_CREATE_ISSUE_LINK } from '../../constants'; /** @public */ export type ChromeHelpExtensionMenuGitHubLink = EuiButtonEmptyProps & { @@ -123,6 +122,7 @@ interface Props { useDefaultContent?: boolean; opensearchDashboardsDocLink: string; surveyLink?: string; + darkmode: boolean; } interface State { @@ -200,24 +200,37 @@ class HeaderHelpMenuUI extends Component { useDefaultContent, opensearchDashboardsDocLink, surveyLink, + darkmode, } = this.props; const { helpExtension, helpSupportUrl } = this.state; const defaultContent = useDefaultContent ? ( - + - + @@ -225,10 +238,16 @@ class HeaderHelpMenuUI extends Component { {surveyLink && (
- + @@ -238,15 +257,15 @@ class HeaderHelpMenuUI extends Component {