diff options
author | Zuul <zuul@review.opendev.org> | 2023-05-03 00:30:33 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-05-03 00:30:33 +0000 |
commit | 51194abf561de04972996199d825613a94cd3b2f (patch) | |
tree | ad759bc813af0bb716135251da1e54135748c276 /web/src/pages/Semaphore.jsx | |
parent | bbdbe81790f4926e5e00085309589a2c52e5230b (diff) | |
parent | 59cd5de78baa31150958e6d0d6733407c0e95805 (diff) | |
download | zuul-51194abf561de04972996199d825613a94cd3b2f.tar.gz |
Merge "web: add dark mode and theme selection"
Diffstat (limited to 'web/src/pages/Semaphore.jsx')
-rw-r--r-- | web/src/pages/Semaphore.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/src/pages/Semaphore.jsx b/web/src/pages/Semaphore.jsx index a0ae8ddca..2cfdfb73f 100644 --- a/web/src/pages/Semaphore.jsx +++ b/web/src/pages/Semaphore.jsx @@ -25,7 +25,7 @@ import { PageSection, PageSectionVariants } from '@patternfly/react-core' import { fetchSemaphoresIfNeeded } from '../actions/semaphores' import Semaphore from '../containers/semaphore/Semaphore' -function SemaphorePage({ match, semaphores, tenant, fetchSemaphoresIfNeeded, isFetching }) { +function SemaphorePage({ match, semaphores, tenant, fetchSemaphoresIfNeeded, isFetching, preferences }) { const semaphoreName = match.params.semaphoreName @@ -38,7 +38,7 @@ function SemaphorePage({ match, semaphores, tenant, fetchSemaphoresIfNeeded, isF e => e.name === semaphoreName) : undefined return ( - <PageSection variant={PageSectionVariants.light}> + <PageSection variant={preferences.darkMode ? PageSectionVariants.dark : PageSectionVariants.light}> <Title headingLevel="h2"> Details for Semaphore <span style={{color: 'var(--pf-global--primary-color--100)'}}>{semaphoreName}</span> </Title> @@ -55,6 +55,7 @@ SemaphorePage.propTypes = { tenant: PropTypes.object.isRequired, isFetching: PropTypes.bool.isRequired, fetchSemaphoresIfNeeded: PropTypes.func.isRequired, + preferences: PropTypes.object, } const mapDispatchToProps = { fetchSemaphoresIfNeeded } @@ -63,6 +64,7 @@ function mapStateToProps(state) { tenant: state.tenant, semaphores: state.semaphores.semaphores, isFetching: state.semaphores.isFetching, + preferences: state.preferences, } } |