Skip to content

Commit

Permalink
put chat logo in ui/logos/opensearch_chat.svg
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Nov 28, 2023
1 parent 26cfad2 commit 3471370
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
8 changes: 8 additions & 0 deletions src/core/common/logos/get_logos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const CENTER_MARK_ON_DARK = 'ui/logos/opensearch_center_mark_on_dark.svg'
export const ANIMATED_MARK_THEMED = 'ui/logos/opensearch_spinner.svg';
export const ANIMATED_MARK_ON_LIGHT = 'ui/logos/opensearch_spinner_on_light.svg';
export const ANIMATED_MARK_ON_DARK = 'ui/logos/opensearch_spinner_on_dark.svg';
export const CHAT = 'ui/logos/opensearch_chat.svg';

interface AssetOption {
url?: string;
Expand Down Expand Up @@ -94,6 +95,8 @@ export const getLogos = (branding: Branding = {}, serverBasePath: string): Logos
// OS animated marks
const defaultLightColorSchemeAnimatedMark = `${serverBasePath}/${ANIMATED_MARK_ON_LIGHT}`;
const defaultDarkColorSchemeAnimatedMark = `${serverBasePath}/${ANIMATED_MARK_ON_DARK}`;
// CHAT logos
const defaultChatLogo = `${serverBasePath}/${CHAT}`;

const colorScheme: ColorScheme = darkMode ? ColorScheme.DARK : ColorScheme.LIGHT;

Expand Down Expand Up @@ -137,6 +140,11 @@ export const getLogos = (branding: Branding = {}, serverBasePath: string): Logos
{ url: defaultLightColorSchemeAnimatedMark, type: ImageType.DEFAULT, colorScheme: ColorScheme.LIGHT },
], darkMode),

Chat: getLogo([
{ url: defaultChatLogo, type: ImageType.CUSTOM, colorScheme: ColorScheme.DARK },
{ url: defaultChatLogo, type: ImageType.CUSTOM, colorScheme: ColorScheme.LIGHT },
], darkMode),

colorScheme,
});
};
1 change: 1 addition & 0 deletions src/core/common/logos/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export interface Logos {
*/
readonly CenterMark: LogoItem;
readonly AnimatedMark: LogoItem;
readonly Chat: LogoItem;
readonly colorScheme: ColorScheme;
}

Expand Down
18 changes: 18 additions & 0 deletions src/core/server/core_app/assets/logos/opensearch_chat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ import {
import { HeroSection } from './hero_section';
import illustration from '../../../../assets/illustration.svg';
import { getServices } from '../../../opensearch_dashboards_services';
import logo from '../../../../assets/logos/chat.svg';
import screenshot from '../../../../assets/screenshot.png';

export const GetStartedSection: React.FC<{ olly?: boolean }> = ({ olly = true }) => {
const services = getServices();
const getUrl = services.application.getUrlForApp;
const navigate = services.application.navigateToApp;
const logos = services.chrome.logos;
const heroConfig = services.homeConfig.hero;
const isHeroEnabled = heroConfig.enabled;
const prompts = isHeroEnabled ? heroConfig.prompts : [];
Expand Down Expand Up @@ -87,7 +87,7 @@ export const GetStartedSection: React.FC<{ olly?: boolean }> = ({ olly = true })
>
<EuiFlexGroup direction="row" responsive={false} alignItems="flexStart" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiIcon type={logo} size="l" />
<EuiIcon type={logos.Chat.url} size="l" />
</EuiFlexItem>
<EuiFlexItem>&quot;{text}&quot;</EuiFlexItem>
</EuiFlexGroup>
Expand Down
18 changes: 0 additions & 18 deletions src/plugins/home/public/assets/logos/chat.svg

This file was deleted.

0 comments on commit 3471370

Please sign in to comment.