summaryrefslogtreecommitdiff
path: root/web/src/pages/Autohold.jsx
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2023-05-03 00:30:33 +0000
committerGerrit Code Review <review@openstack.org>2023-05-03 00:30:33 +0000
commit51194abf561de04972996199d825613a94cd3b2f (patch)
treead759bc813af0bb716135251da1e54135748c276 /web/src/pages/Autohold.jsx
parentbbdbe81790f4926e5e00085309589a2c52e5230b (diff)
parent59cd5de78baa31150958e6d0d6733407c0e95805 (diff)
downloadzuul-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.jsx10
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,
}
}