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/Autohold.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/Autohold.jsx')
-rw-r--r-- | web/src/pages/Autohold.jsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/web/src/pages/Autohold.jsx b/web/src/pages/Autohold.jsx index 0d0198b45..cc91cbcd0 100644 --- a/web/src/pages/Autohold.jsx +++ b/web/src/pages/Autohold.jsx @@ -59,6 +59,7 @@ class AutoholdPage extends React.Component { autohold: PropTypes.object, isFetching: PropTypes.bool.isRequired, fetchAutohold: PropTypes.func.isRequired, + preferences: PropTypes.object, } updateData = () => { @@ -147,7 +148,7 @@ class AutoholdPage extends React.Component { return ( <> - <PageSection variant={PageSectionVariants.light}> + <PageSection variant={this.props.preferences.darkMode ? PageSectionVariants.dark : PageSectionVariants.light}> <Title headingLevel="h2">Autohold Request {autohold.id}</Title> <Flex className="zuul-autohold-attributes"> @@ -211,7 +212,9 @@ class AutoholdPage extends React.Component { value={ <> <strong>Reason:</strong> - <pre>{autohold.reason}</pre> + <div className={this.props.preferences.darkMode ? 'zuul-console-dark' : ''}> + <pre>{autohold.reason}</pre> + </div> </> } /> @@ -221,7 +224,7 @@ class AutoholdPage extends React.Component { </Flex> </Flex> </PageSection> - <PageSection variant={PageSectionVariants.light}> + <PageSection variant={this.props.preferences.darkMode ? PageSectionVariants.dark : PageSectionVariants.light}> <Title headingLevel="h3"> <BuildIcon style={{ @@ -243,6 +246,7 @@ function mapStateToProps(state) { autohold: state.autoholds.autohold, tenant: state.tenant, isFetching: state.autoholds.isFetching, + preferences: state.preferences, } } |