From bb5ccc02c26e1c437d40abc4b882df42ad6dabc9 Mon Sep 17 00:00:00 2001 From: Joseph Garrone Date: Wed, 7 Aug 2024 07:46:14 +0200 Subject: [PATCH] Update styling --- src/App.tsx | 82 +++++++++++++++++++++++++++++++++------------------- src/main.tsx | 7 +---- 2 files changed, 53 insertions(+), 36 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 60859ee..25ff473 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,44 +9,66 @@ import { OidcProvider } from "oidc"; import Divider from "@mui/material/Divider"; import ToolTip from "@mui/material/Tooltip"; import LogoutIcon from "@mui/icons-material/Logout"; +import CircularProgress from "@mui/material/CircularProgress"; export function App() { + const { css } = useStyles(); + return ( ( - - {(() => { - switch (initializationError.type) { - case "server down": - return ( - <> - Your local Keycloak doesn't seem to be up and running.
- To start it, simply run the following command in the root directory of your Keycloakify project:
- npx keycloakify start-keycloak
- Or, if you are in a monorepo:
- npx keycloakify start-keycloak --project packages/keycloak-theme (for example)
- - ); - case "bad configuration": - return ( - <> - You've modified the configuration of the Keycloak server in a way that is incompatible with - - this test application - . - - ); - case "unknown": - return initializationError.message; - } - })()} -
+
+ + {(() => { + switch (initializationError.type) { + case "server down": + return ( + <> + Your local Keycloak doesn't seem to be running.
+ Please refer to the documentation. + + ); + case "bad configuration": + return ( + <> + You've modified the configuration of the Keycloak server in a way that is incompatible with + + this test application + .
+ You can open the console to see the error message. + + ); + case "unknown": + return initializationError.message; + } + })()} +
+
)} fallback={ - - Redirecting to your local Keycloak server... - +
+ + +   + Redirecting to your local Keycloak server... + +
} > diff --git a/src/main.tsx b/src/main.tsx index 1386ab9..82b19f9 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,6 @@ import React from "react"; import ReactDOM from "react-dom/client"; import { App } from "./App.tsx"; -import { OidcProvider } from "oidc"; import { ThemeProvider } from "@mui/material/styles"; import { createTheme } from "@mui/material/styles"; import { getIsSafari } from "./tools/getIsSafari"; @@ -33,11 +32,7 @@ ReactDOM.createRoot(document.getElementById("root")!).render( return ; } - return ( - - - - ); + return ; })()}