diff --git a/src/app/AppLayout/AppLayout.tsx b/src/app/AppLayout/AppLayout.tsx index c7fb4f8d..267f5199 100644 --- a/src/app/AppLayout/AppLayout.tsx +++ b/src/app/AppLayout/AppLayout.tsx @@ -41,7 +41,7 @@ import { IAppRoute, routes } from '@app/routes'; import { APIAlertProvider } from '@app/providers/APIAlertProvider'; import { ActionResponseAlert } from '@app/Common/ActionResponseAlert'; import { useHistory } from 'react-router'; -import { global_spacer_sm } from '@patternfly/react-tokens'; +import { global_Color_light_100, global_spacer_sm } from '@patternfly/react-tokens'; import { About } from '@app/About/About'; import { ErrorBoundary } from '@app/ErrorBoundary'; import { BannerAlert } from '@app/Common/BannerAlert'; @@ -165,11 +165,12 @@ const AppLayout: React.FunctionComponent = ({ init, children }) => { spacer={{ default: 'spacerNone', md: 'spacerMd' }} > {props.cacheType} - + ); }; export { CacheTypeBadge }; diff --git a/src/app/app.css b/src/app/app.css index 9fc21398..e911cae2 100644 --- a/src/app/app.css +++ b/src/app/app.css @@ -55,3 +55,7 @@ body, .role-icon { margin-right: var(--pf-v5-global--spacer--xs); } + +.darkThemeSwitch .pf-v5-c-switch__input:not(:checked) ~ .pf-v5-c-switch__label { + color: var(--pf-v5-global--Color--light-100); +} diff --git a/src/app/assets/languages/en.json b/src/app/assets/languages/en.json index 932d69d3..1a75ec8a 100644 --- a/src/app/assets/languages/en.json +++ b/src/app/assets/languages/en.json @@ -20,7 +20,8 @@ "skip-to-content": "Skip to Content", "about-name": "About", "documentation-name": "Documentation", - "close-browser-message": "Close the browser or open an incognito window to log again." + "close-browser-message": "Close the browser or open an incognito window to log again.", + "dark-theme": "Dark theme" }, "welcome-page": { "welcome-title": "Welcome to {{brandname}} Server", diff --git a/src/app/providers/ThemeProvider.tsx b/src/app/providers/ThemeProvider.tsx index b3e90c9c..55ef48bd 100644 --- a/src/app/providers/ThemeProvider.tsx +++ b/src/app/providers/ThemeProvider.tsx @@ -22,7 +22,7 @@ const ThemeProvider = ({children})=>{ document.documentElement.classList.remove('pf-v5-theme-dark'); } - if(localStorage){ + if (localStorage) { localStorage.setItem('theme',theme); } },[theme]) @@ -33,9 +33,9 @@ const ThemeProvider = ({children})=>{ const themeState = { theme, toggleTheme, - syntaxHighLighterTheme + syntaxHighLighterTheme } return {children} } -export {ThemeProvider} \ No newline at end of file +export {ThemeProvider}