+
+
+
+
+ );
+}
diff --git a/src/components/applications/UserDashboard.tsx b/src/components/applications/UserDashboard.tsx
new file mode 100644
index 00000000..4cc07f79
--- /dev/null
+++ b/src/components/applications/UserDashboard.tsx
@@ -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 (
+
+
+
+
+ Hello {accessTokenPayload["preferred_username"]}
+
+
+
+ );
+}
diff --git a/src/components/layout/Dashboard.tsx b/src/components/layout/Dashboard.tsx
index 22b13d08..76e8efe3 100644
--- a/src/components/layout/Dashboard.tsx
+++ b/src/components/layout/Dashboard.tsx
@@ -9,6 +9,9 @@ import Toolbar from "@mui/material/Toolbar";
import Stack from "@mui/material/Stack";
import { LoginButton } from "../ui/LoginButton";
import DashboardDrawer from "../ui/DashboardDrawer";
+import { useMUITheme } from "@/hooks/theme";
+import { ThemeProvider as MUIThemeProvider } from "@mui/material/styles";
+import { ThemeToggleButton } from "../ui/ThemeToggleButton";
interface DashboardProps {
children: React.ReactNode;
@@ -22,6 +25,7 @@ interface DashboardProps {
* @return an dashboard layout
*/
export default function Dashboard(props: DashboardProps) {
+ const theme = useMUITheme();
/** State management for mobile drawer */
const [mobileOpen, setMobileOpen] = React.useState(false);
const handleDrawerToggle = () => {
@@ -34,66 +38,70 @@ export default function Dashboard(props: DashboardProps) {
return (
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- {/* Here two types of drawers are rendered:
+
+
+
+
+
+
+
+
+
+ {/* Here two types of drawers are rendered:
1. Temporary drawer: Visible on small screens (xs) and is collapsible.
2. Permanent drawer: Visible on larger screens (sm) and stays fixed.
Depending on the screen size, only one will be visible at a time. */}
-
-
-
-
- {props.children}
-
+
+
+
+
+ {props.children}
+
+
);
}
diff --git a/src/components/layout/Showcase.tsx b/src/components/layout/Showcase.tsx
index 3e6737a8..c6090e82 100644
--- a/src/components/layout/Showcase.tsx
+++ b/src/components/layout/Showcase.tsx
@@ -11,6 +11,9 @@ import { LoginButton } from "../ui/LoginButton";
import { Box, Stack } from "@mui/material";
import { DashboardButton } from "../ui/DashboardButton";
import Image from "next/image";
+import { ThemeToggleButton } from "../ui/ThemeToggleButton";
+import { useMUITheme } from "@/hooks/theme";
+import { ThemeProvider as MUIThemeProvider } from "@mui/material/styles";
/**
* Build the showcase content with an AppBar
@@ -18,6 +21,8 @@ import Image from "next/image";
* @returns showcase content
*/
export default function Showcase() {
+ const theme = useMUITheme();
+
const Item = styled(Paper)(({ theme }) => ({
padding: theme.spacing(6),
elevation: 0,
@@ -25,73 +30,76 @@ export default function Showcase() {
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The DIRAC interware is a software framework that enables
- communities to interact with distributed computing resources.
- DIRAC forms a layer between users and resources, hiding
- diversities across computing and storage resources.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- DIRAC has been adopted by several HEP and non-HEP experiments
- communities, with different goals, intents, resources and
- workflows: it is experiment agnostic, extensible, and flexible.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The DIRAC interware is a software framework that enables
+ communities to interact with distributed computing resources.
+ DIRAC forms a layer between users and resources, hiding
+ diversities across computing and storage resources.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DIRAC has been adopted by several HEP and non-HEP experiments
+ communities, with different goals, intents, resources and
+ workflows: it is experiment agnostic, extensible, and flexible.
+
+
-
-
+
+
);
}
diff --git a/src/components/ui/DashboardButton.tsx b/src/components/ui/DashboardButton.tsx
index f29ff92a..a226b418 100644
--- a/src/components/ui/DashboardButton.tsx
+++ b/src/components/ui/DashboardButton.tsx
@@ -1,5 +1,6 @@
import { useOidcAccessToken } from "@axa-fr/react-oidc";
import { Button } from "@mui/material";
+import { deepOrange, lightGreen } from "@mui/material/colors";
import Link from "next/link";
/**
@@ -14,7 +15,14 @@ export function DashboardButton() {
}
return (
-