Update Keycloakify

This commit is contained in:
Joseph Garrone committed 2024-04-10 03:43:23 +02:00
1 parent 3dcca4203e
commit 32f1de064b
4 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@
"keywords": [],
"dependencies": {
"evt": "^2.5.7",
"keycloakify": "^9.6.4",
"keycloakify": "^9.6.6",
"oidc-spa": "^4.2.1",
"powerhooks": "^1.0.8",
"react": "^18.2.0",
+3 -3
View File
@@ -25,7 +25,9 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
`${url.resourcesPath}/css/account.css`
],
"htmlClassName": getClassName("kcHtmlClass"),
"bodyClassName": clsx("admin-console", "user", getClassName("kcBodyClass"))
"bodyClassName": clsx("admin-console", "user", getClassName("kcBodyClass")),
"htmlLangProperty": locale?.currentLanguageTag,
"documentTitle": i18n.msgStr("accountManagementTitle")
});
if (!isReady) {
@@ -47,14 +49,12 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
{realm.internationalizationEnabled && (assert(locale !== undefined), true) && locale.supported.length > 1 && (
<li>
<div className="kc-dropdown" id="kc-locale-dropdown">
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<a href="#" id="kc-current-locale-link">
{labelBySupportedLanguageTag[currentLanguageTag]}
</a>
<ul>
{locale.supported.map(({ languageTag }) => (
<li key={languageTag} className="kc-dropdown-item">
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
<a href="#" onClick={() => changeLocale(languageTag)}>
{labelBySupportedLanguageTag[languageTag]}
</a>
+4 -4
View File
@@ -1,6 +1,6 @@
// Copy pasted from: https://github.com/InseeFrLab/keycloakify/blob/main/src/login/Template.tsx
import { useState, useEffect } from "react";
import { useEffect } from "react";
import { assert } from "keycloakify/tools/assert";
import { clsx } from "keycloakify/tools/clsx";
import { usePrepareTemplate } from "keycloakify/lib/usePrepareTemplate";
@@ -42,11 +42,11 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
`${url.resourcesPath}/css/login.css`
],
"htmlClassName": getClassName("kcHtmlClass"),
"bodyClassName": getClassName("kcBodyClass")
"bodyClassName": getClassName("kcBodyClass"),
"htmlLangProperty": locale?.currentLanguageTag,
"documentTitle": i18n.msgStr("loginTitle", kcContext.realm.displayName)
});
useState(()=> { document.title = i18n.msgStr("loginTitle", kcContext.realm.displayName); });
useEffect(() => {
console.log(`Value of MY_ENV_VARIABLE on the Keycloak server: "${kcContext.properties.MY_ENV_VARIABLE}"`);
}, []);
Loaded 3 of 4 files, more files were not shown because too many files have changed in this diff. Show more