Link to the documentation for implementing non builtin pages
This commit is contained in:
parent
248effc57d
commit
f59fa4238c
@ -92,12 +92,14 @@ export async function command(params: { buildContext: BuildContext }) {
|
|||||||
const templateValue = "Template.tsx (Layout common to every page)";
|
const templateValue = "Template.tsx (Layout common to every page)";
|
||||||
const userProfileFormFieldsValue =
|
const userProfileFormFieldsValue =
|
||||||
"UserProfileFormFields.tsx (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)";
|
"UserProfileFormFields.tsx (Renders the form of the register.ftl, login-update-profile.ftl, update-email.ftl and idp-review-user-profile.ftl)";
|
||||||
|
const otherPageValue = "The page you're looking for isn't listed here";
|
||||||
|
|
||||||
const { value: pageIdOrComponent } = await cliSelect<
|
const { value: pageIdOrComponent } = await cliSelect<
|
||||||
| LoginThemePageId
|
| LoginThemePageId
|
||||||
| AccountThemePageId
|
| AccountThemePageId
|
||||||
| typeof templateValue
|
| typeof templateValue
|
||||||
| typeof userProfileFormFieldsValue
|
| typeof userProfileFormFieldsValue
|
||||||
|
| typeof otherPageValue
|
||||||
>({
|
>({
|
||||||
values: (() => {
|
values: (() => {
|
||||||
switch (themeType) {
|
switch (themeType) {
|
||||||
@ -105,10 +107,11 @@ export async function command(params: { buildContext: BuildContext }) {
|
|||||||
return [
|
return [
|
||||||
templateValue,
|
templateValue,
|
||||||
userProfileFormFieldsValue,
|
userProfileFormFieldsValue,
|
||||||
...LOGIN_THEME_PAGE_IDS
|
...LOGIN_THEME_PAGE_IDS,
|
||||||
|
otherPageValue
|
||||||
];
|
];
|
||||||
case "account":
|
case "account":
|
||||||
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS];
|
return [templateValue, ...ACCOUNT_THEME_PAGE_IDS, otherPageValue];
|
||||||
}
|
}
|
||||||
assert<Equals<typeof themeType, never>>(false);
|
assert<Equals<typeof themeType, never>>(false);
|
||||||
})()
|
})()
|
||||||
@ -116,6 +119,17 @@ export async function command(params: { buildContext: BuildContext }) {
|
|||||||
process.exit(-1);
|
process.exit(-1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (pageIdOrComponent === otherPageValue) {
|
||||||
|
console.log(
|
||||||
|
[
|
||||||
|
"To style a page not included in the base Keycloak, such as one added by a third-party Keycloak extension,",
|
||||||
|
"refer to the documentation: https://docs.keycloakify.dev/features/styling-a-custom-page-not-included-in-base-keycloak"
|
||||||
|
].join(" ")
|
||||||
|
);
|
||||||
|
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
console.log(`→ ${pageIdOrComponent}`);
|
console.log(`→ ${pageIdOrComponent}`);
|
||||||
|
|
||||||
const componentBasename = (() => {
|
const componentBasename = (() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user