Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6.x bakcport of #1188: Adds posibility to set the background image for the About modal #1189

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/public/hawtconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"title": "Hawtio Management Console",
"description": "A Hawtio reimplementation based on TypeScript + React.",
"imgSrc": "hawtio-logo.svg",
"backgroundImgSrc": "pf-background.svg",
"productInfo": [
{ "name": "ABC", "value": "1.2.3" },
{ "name": "XYZ", "value": "7.8.9" }
Expand Down
15 changes: 15 additions & 0 deletions app/public/img/background-inverted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions app/public/pf-background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions packages/hawtio/src/core/config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export type AboutConfig = {
title?: string
description?: string
imgSrc?: string
backgroundImgSrc?: string
productInfo?: AboutProductInfo[]
copyright?: string
}
Expand Down
3 changes: 2 additions & 1 deletion packages/hawtio/src/ui/about/HawtioAbout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const HawtioAbout: React.FunctionComponent<HawtioAboutProps> = props => {
}

const imgSrc = about.imgSrc || imgLogo
const backgroundImgSrc = about.backgroundImgSrc
const title = about.title || 'Hawtio Management Console'
const copyright = about.copyright || '© Hawtio project'

Expand All @@ -36,7 +37,6 @@ export const HawtioAbout: React.FunctionComponent<HawtioAboutProps> = props => {
const productInfo = about.productInfo || []
productInfo.sort((a, b) => stringSorter(a.name, b.name))
log.debug('Product info:', productInfo)

const AboutProductInfo = () => (
<TextContent id='hawtio-about-product-info'>
<Text component='h3'>Component versions</Text>
Expand All @@ -57,6 +57,7 @@ export const HawtioAbout: React.FunctionComponent<HawtioAboutProps> = props => {
onClose={props.onClose}
productName={title}
brandImageSrc={imgSrc}
backgroundImageSrc={backgroundImgSrc}
brandImageAlt={title}
trademark={copyright}
>
Expand Down