From 2c624712cc4869958ced1aad86e305fd327dec1c Mon Sep 17 00:00:00 2001 From: Nikhil Nawgiri Date: Sat, 27 Apr 2024 18:37:39 +0200 Subject: [PATCH] Add wrapper and apply ps-background --- src/keycloak-theme/login/Template.tsx | 259 +++++++++++++------------- 1 file changed, 131 insertions(+), 128 deletions(-) diff --git a/src/keycloak-theme/login/Template.tsx b/src/keycloak-theme/login/Template.tsx index 034cb74..a2beb18 100644 --- a/src/keycloak-theme/login/Template.tsx +++ b/src/keycloak-theme/login/Template.tsx @@ -6,6 +6,7 @@ import { usePrepareTemplate } from "keycloakify/lib/usePrepareTemplate"; import { type TemplateProps } from "keycloakify/login/TemplateProps"; import type { KcContext } from "./kcContext"; import type { I18n } from "./i18n"; +import "../resources/styles/scss/background.scss"; export default function Template(props: TemplateProps) { const { @@ -46,133 +47,135 @@ export default function Template(props: TemplateProps) { return null; } - return (<> -
- {realm.internationalizationEnabled && (assert(locale !== undefined), true) && locale.supported.length > 1 && ( - - )} - {!(auth !== undefined && auth.showUsername && !auth.showResetCredentials) ? ( - displayRequiredFields ? ( -
-
- - * - {msg("requiredFields")} - -
-
-

{headerNode}

-
-
- ) : ( -

{headerNode}

- ) - ) : displayRequiredFields ? ( -
-
- - * {msg("requiredFields")} - -
-
- {showUsernameNode} -
-
- - -
- - {msg("restartLoginTooltip")} -
-
-
-
-
-
- ) : ( - <> - {showUsernameNode} -
-
- - -
- - {msg("restartLoginTooltip")} -
-
-
-
- - )} -
-
-
- {/* App-initiated actions should not see warning messages about the need to complete the action during login. */} - {displayMessage && message !== undefined && (message.type !== "warning" || !isAppInitiatedAction) && ( -
- {message.type === "success" && } - {message.type === "warning" && } - {message.type === "error" && } - {message.type === "info" && } - -
- )} - {children} - {auth !== undefined && auth.showTryAnotherWayLink && showAnotherWayIfPresent && ( -
- -
- )} - {displayInfo && ( -
-
- {infoNode} -
-
- )} -
-
- + return ( +
+
+ lorem ipsum - 27.04.2024 + {realm.internationalizationEnabled && (assert(locale !== undefined), true) && locale.supported.length > 1 && ( + + )} + {!(auth !== undefined && auth.showUsername && !auth.showResetCredentials) ? ( + displayRequiredFields ? ( +
+
+ + * + {msg("requiredFields")} + +
+
+

{headerNode}

+
+
+ ) : ( +

{headerNode}

+ ) + ) : displayRequiredFields ? ( +
+
+ + * {msg("requiredFields")} + +
+
+ {showUsernameNode} +
+
+ + +
+ + {msg("restartLoginTooltip")} +
+
+
+
+
+
+ ) : ( + <> + {showUsernameNode} +
+
+ + +
+ + {msg("restartLoginTooltip")} +
+
+
+
+ + )} +
+
+
+ {/* App-initiated actions should not see warning messages about the need to complete the action during login. */} + {displayMessage && message !== undefined && (message.type !== "warning" || !isAppInitiatedAction) && ( +
+ {message.type === "success" && } + {message.type === "warning" && } + {message.type === "error" && } + {message.type === "info" && } + +
+ )} + {children} + {auth !== undefined && auth.showTryAnotherWayLink && showAnotherWayIfPresent && ( +
+ +
+ )} + {displayInfo && ( +
+
+ {infoNode} +
+
+ )} +
+
+
); }