summaryrefslogtreecommitdiff
path: root/web/src/pages/Job.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/Job.jsx
parentbbdbe81790f4926e5e00085309589a2c52e5230b (diff)
parent59cd5de78baa31150958e6d0d6733407c0e95805 (diff)
downloadzuul-51194abf561de04972996199d825613a94cd3b2f.tar.gz
Merge "web: add dark mode and theme selection"
Diffstat (limited to 'web/src/pages/Job.jsx')
-rw-r--r--web/src/pages/Job.jsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/src/pages/Job.jsx b/web/src/pages/Job.jsx
index efb4cfddc..f29ea383d 100644
--- a/web/src/pages/Job.jsx
+++ b/web/src/pages/Job.jsx
@@ -26,7 +26,8 @@ class JobPage extends React.Component {
match: PropTypes.object.isRequired,
tenant: PropTypes.object,
remoteData: PropTypes.object,
- dispatch: PropTypes.func
+ dispatch: PropTypes.func,
+ preferences: PropTypes.object,
}
updateData = (force) => {
@@ -53,7 +54,7 @@ class JobPage extends React.Component {
const tenantJobs = remoteData.jobs[this.props.tenant.name]
const jobName = this.props.match.params.jobName
return (
- <PageSection variant={PageSectionVariants.light}>
+ <PageSection variant={this.props.preferences.darkMode? PageSectionVariants.dark : PageSectionVariants.light}>
{tenantJobs && tenantJobs[jobName] && <Job job={tenantJobs[jobName]} />}
</PageSection>
)
@@ -63,4 +64,5 @@ class JobPage extends React.Component {
export default connect(state => ({
tenant: state.tenant,
remoteData: state.job,
+ preferences: state.preferences,
}))(JobPage)