-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from aldbr/main_add-dark-mode
feat: add dark mode
- Loading branch information
Showing
22 changed files
with
555 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
import { JobDataGrid } from "@/components/data/JobDataGrid"; | ||
import JobMonitor from "@/components/applications/JobMonitor"; | ||
|
||
export default async function Page() { | ||
return ( | ||
<div style={{ width: "100%", height: 400 }}> | ||
<h2>Job Monitor</h2> | ||
<JobDataGrid /> | ||
</div> | ||
); | ||
return <JobMonitor />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
import UserDashboard from "@/components/applications/UserDashboard"; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<span>Hello User</span> | ||
</div> | ||
); | ||
return <UserDashboard />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +0,0 @@ | ||
:root { | ||
--foreground-rgb: 0, 0, 0; | ||
--background-start-rgb: 214, 219, 220; | ||
--background-end-rgb: 255, 255, 255; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
:root { | ||
--foreground-rgb: 0, 0, 0; | ||
--background-start-rgb: 255, 255, 255; | ||
--background-end-rgb: 255, 255, 255; | ||
} | ||
} | ||
|
||
body { | ||
color: rgb(var(--foreground-rgb)); | ||
background: linear-gradient( | ||
to bottom, | ||
transparent, | ||
rgb(var(--background-end-rgb)) | ||
) | ||
rgb(var(--background-start-rgb)); | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use client"; | ||
import * as React from "react"; | ||
import CssBaseline from "@mui/material/CssBaseline"; | ||
import { Box } from "@mui/material"; | ||
import { useMUITheme } from "@/hooks/theme"; | ||
import { ThemeProvider as MUIThemeProvider } from "@mui/material/styles"; | ||
import { JobDataGrid } from "../ui/JobDataGrid"; | ||
|
||
/** | ||
* Build the Job Monitor application | ||
* @returns Job Monitor content | ||
*/ | ||
export default function JobMonitor() { | ||
const theme = useMUITheme(); | ||
|
||
return ( | ||
<React.Fragment> | ||
<MUIThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Box | ||
sx={{ | ||
ml: "5%", | ||
mr: "5%", | ||
}} | ||
> | ||
<h2>Job Monitor</h2> | ||
<JobDataGrid /> | ||
</Box> | ||
</MUIThemeProvider> | ||
</React.Fragment> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use client"; | ||
import * as React from "react"; | ||
import CssBaseline from "@mui/material/CssBaseline"; | ||
import { Box } from "@mui/material"; | ||
import { useMUITheme } from "@/hooks/theme"; | ||
import { ThemeProvider as MUIThemeProvider } from "@mui/material/styles"; | ||
import { useOidcAccessToken } from "@axa-fr/react-oidc"; | ||
|
||
/** | ||
* Build the User Dashboard page | ||
* @returns User Dashboard content | ||
*/ | ||
export default function UserDashboard() { | ||
const theme = useMUITheme(); | ||
const { accessTokenPayload } = useOidcAccessToken(); | ||
|
||
return ( | ||
<React.Fragment> | ||
<MUIThemeProvider theme={theme}> | ||
<CssBaseline /> | ||
<Box | ||
sx={{ | ||
ml: "5%", | ||
mr: "5%", | ||
}} | ||
> | ||
<span>Hello {accessTokenPayload["preferred_username"]}</span> | ||
</Box> | ||
</MUIThemeProvider> | ||
</React.Fragment> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.