This commit is contained in:
Joseph Garrone 2024-06-09 15:00:18 +02:00
parent af7733b3dc
commit 34971c67de
9 changed files with 17 additions and 25 deletions

View File

@ -12,6 +12,6 @@ const config: StorybookConfig = {
name: "@storybook/react-vite", name: "@storybook/react-vite",
options: {} options: {}
}, },
staticDirs: ["../public"], staticDirs: ["../public"]
}; };
export default config; export default config;

View File

@ -9,7 +9,4 @@ export type KcContextExtension = {
export type KcContextExtensionPerPage = {}; export type KcContextExtensionPerPage = {};
export type KcContext = ExtendKcContext< export type KcContext = ExtendKcContext<KcContextExtension, KcContextExtensionPerPage>;
KcContextExtension,
KcContextExtensionPerPage
>;

View File

@ -1,10 +1,7 @@
import type { DeepPartial } from "keycloakify/tools/DeepPartial"; import type { DeepPartial } from "keycloakify/tools/DeepPartial";
import type { KcContext } from "./KcContext"; import type { KcContext } from "./KcContext";
import { createGetKcContextMock } from "keycloakify/account/KcContext"; import { createGetKcContextMock } from "keycloakify/account/KcContext";
import type { import type { KcContextExtension, KcContextExtensionPerPage } from "./KcContext";
KcContextExtension,
KcContextExtensionPerPage
} from "./KcContext";
import KcPage from "./KcPage"; import KcPage from "./KcPage";
import { themeNames, kcEnvDefaults } from "../kc.gen"; import { themeNames, kcEnvDefaults } from "../kc.gen";

View File

@ -9,7 +9,4 @@ export type KcContextExtension = {
export type KcContextExtensionPerPage = {}; export type KcContextExtensionPerPage = {};
export type KcContext = ExtendKcContext< export type KcContext = ExtendKcContext<KcContextExtension, KcContextExtensionPerPage>;
KcContextExtension,
KcContextExtensionPerPage
>;

View File

@ -5,7 +5,9 @@ import { useDownloadTerms } from "keycloakify/login";
import { useI18n } from "./i18n"; import { useI18n } from "./i18n";
import DefaultPage from "keycloakify/login/DefaultPage"; import DefaultPage from "keycloakify/login/DefaultPage";
import Template from "keycloakify/login/Template"; import Template from "keycloakify/login/Template";
const UserProfileFormFields = lazy(() => import("keycloakify/login/UserProfileFormFields")); const UserProfileFormFields = lazy(
() => import("keycloakify/login/UserProfileFormFields")
);
const doMakeUserConfirmPassword = true; const doMakeUserConfirmPassword = true;
@ -31,7 +33,9 @@ export default function KcApp(props: { kcContext: KcContext }) {
break; break;
} }
const termsMarkdown = await fetch(`${import.meta.env.BASE_URL}terms/${termsFileName}`).then(r => r.text()); const termsMarkdown = await fetch(
`${import.meta.env.BASE_URL}terms/${termsFileName}`
).then(r => r.text());
return { termsMarkdown, termsLanguageTag }; return { termsMarkdown, termsLanguageTag };
} }

View File

@ -2,10 +2,7 @@ import type { DeepPartial } from "keycloakify/tools/DeepPartial";
import type { KcContext } from "./KcContext"; import type { KcContext } from "./KcContext";
import KcPage from "./KcPage"; import KcPage from "./KcPage";
import { createGetKcContextMock } from "keycloakify/login/KcContext"; import { createGetKcContextMock } from "keycloakify/login/KcContext";
import type { import type { KcContextExtension, KcContextExtensionPerPage } from "./KcContext";
KcContextExtension,
KcContextExtensionPerPage
} from "./KcContext";
import { themeNames, kcEnvDefaults } from "../kc.gen"; import { themeNames, kcEnvDefaults } from "../kc.gen";
const kcContextExtension: KcContextExtension = { const kcContextExtension: KcContextExtension = {