fmt
This commit is contained in:
parent
af7733b3dc
commit
34971c67de
@ -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;
|
||||||
|
@ -18,7 +18,7 @@ yarn build-keycloak-theme
|
|||||||
|
|
||||||
# Storybook
|
# Storybook
|
||||||
|
|
||||||
Spin up a test environment for your Keycloak pages.
|
Spin up a test environment for your Keycloak pages.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx keycloakify add-story # Select the pages you want to add stories for
|
npx keycloakify add-story # Select the pages you want to add stories for
|
||||||
@ -28,7 +28,7 @@ yarn storybook # Start Storybook
|
|||||||
# Test in a real Keycloak environment
|
# Test in a real Keycloak environment
|
||||||
|
|
||||||
Test your theme in a local Keycloak docker container.
|
Test your theme in a local Keycloak docker container.
|
||||||
You need to have Docker running. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) if you don't have it.
|
You need to have Docker running. Install [Docker Desktop](https://www.docker.com/products/docker-desktop/) if you don't have it.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx keycloakify start-keycloak
|
npx keycloakify start-keycloak
|
||||||
@ -85,7 +85,7 @@ You'll need to apply theses changes to the `src/main.tsx` file:
|
|||||||
</Suspense>
|
</Suspense>
|
||||||
</StrictMode>
|
</StrictMode>
|
||||||
);
|
);
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
kcContext?:
|
kcContext?:
|
||||||
|
@ -48,4 +48,4 @@
|
|||||||
"resolutions": {
|
"resolutions": {
|
||||||
"jackspeak": "2.1.1"
|
"jackspeak": "2.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
>;
|
|
||||||
|
@ -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";
|
||||||
|
|
||||||
|
@ -18,4 +18,4 @@ export const KcEnvNames: KcEnvName[] = [];
|
|||||||
|
|
||||||
export const kcEnvDefaults: Record<KcEnvName, string> = {};
|
export const kcEnvDefaults: Record<KcEnvName, string> = {};
|
||||||
|
|
||||||
/* prettier-ignore-end */
|
/* prettier-ignore-end */
|
||||||
|
@ -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
|
|
||||||
>;
|
|
||||||
|
@ -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 };
|
||||||
}
|
}
|
||||||
@ -61,4 +65,4 @@ export default function KcApp(props: { kcContext: KcContext }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const classes = {} satisfies { [key in ClassKey]?: string };
|
const classes = {} satisfies { [key in ClassKey]?: string };
|
||||||
|
@ -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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user