Implement Error page
This commit is contained in:
@ -1,4 +1,15 @@
|
|||||||
<script>const _=
|
<script>const _=
|
||||||
{
|
{
|
||||||
|
"client": (function (){
|
||||||
|
|
||||||
|
<#if client??>
|
||||||
|
return {
|
||||||
|
"baseUrl": "${(client.baseUrl!'')?no_esc}" || undefined
|
||||||
|
};
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
|
||||||
|
})()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -31,7 +31,7 @@
|
|||||||
"pageRedirectUri": "${(pageRedirectUri!'')?no_esc}" || undefined,
|
"pageRedirectUri": "${(pageRedirectUri!'')?no_esc}" || undefined,
|
||||||
"actionUri": "${(actionUri!'')?no_esc}" || undefined,
|
"actionUri": "${(actionUri!'')?no_esc}" || undefined,
|
||||||
"client": {
|
"client": {
|
||||||
"baseUrl": "${(actionUri!'')?no_esc}" || undefined
|
"baseUrl": "${(client.baseUrl!'')?no_esc}" || undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
@ -7,6 +7,7 @@
|
|||||||
"realm": {
|
"realm": {
|
||||||
"loginWithEmailAllowed": ${realm.loginWithEmailAllowed?c},
|
"loginWithEmailAllowed": ${realm.loginWithEmailAllowed?c},
|
||||||
"rememberMe": ${realm.rememberMe?c},
|
"rememberMe": ${realm.rememberMe?c},
|
||||||
|
"password": ${realm.password?c},
|
||||||
"resetPasswordAllowed": ${realm.resetPasswordAllowed?c},
|
"resetPasswordAllowed": ${realm.resetPasswordAllowed?c},
|
||||||
"registrationAllowed": ${realm.registrationAllowed?c}
|
"registrationAllowed": ${realm.registrationAllowed?c}
|
||||||
},
|
},
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
"displayName": "${realm.displayName!''}" || undefined,
|
"displayName": "${realm.displayName!''}" || undefined,
|
||||||
"displayNameHtml": "${realm.displayNameHtml!''}" || undefined,
|
"displayNameHtml": "${realm.displayNameHtml!''}" || undefined,
|
||||||
"internationalizationEnabled": ${realm.internationalizationEnabled?c},
|
"internationalizationEnabled": ${realm.internationalizationEnabled?c},
|
||||||
"password": ${realm.password?c},
|
|
||||||
"registrationEmailAsUsername": ${realm.registrationEmailAsUsername?c},
|
"registrationEmailAsUsername": ${realm.registrationEmailAsUsername?c},
|
||||||
},
|
},
|
||||||
"locale": (function (){
|
"locale": (function (){
|
||||||
|
@ -24,12 +24,17 @@ export const Error = memo((props: KcProps) => {
|
|||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={t("errorTitle")}
|
headerNode={t("errorTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<div id="kc-error-message">
|
<div id="kc-error-message">
|
||||||
<p className="instruction">{message.summary}</p>
|
<p className="instruction">{message.summary}</p>
|
||||||
<#if client?? && client.baseUrl?has_content>
|
{
|
||||||
<p><a id="backToApplication" href="${client.baseUrl}">${kcSanitize(msg("backToApplication"))?no_esc}</a></p>
|
client !== undefined && client.baseUrl !== undefined &&
|
||||||
</#if>
|
<p>
|
||||||
</div>
|
<a id="backToApplication" href={client.baseUrl}>
|
||||||
|
{t("backToApplication")}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -6,6 +6,7 @@ import type { KcProps } from "./KcProps";
|
|||||||
import { Login } from "./Login";
|
import { Login } from "./Login";
|
||||||
import { Register } from "./Register";
|
import { Register } from "./Register";
|
||||||
import { Info } from "./Info";
|
import { Info } from "./Info";
|
||||||
|
import { Error } from "./Error";
|
||||||
|
|
||||||
|
|
||||||
export const KcApp = memo((props: KcProps) => {
|
export const KcApp = memo((props: KcProps) => {
|
||||||
@ -16,6 +17,7 @@ export const KcApp = memo((props: KcProps) => {
|
|||||||
case "login.ftl": return <Login {...props} />;
|
case "login.ftl": return <Login {...props} />;
|
||||||
case "register.ftl": return <Register {...props} />;
|
case "register.ftl": return <Register {...props} />;
|
||||||
case "info.ftl": return <Info {...props} />;
|
case "info.ftl": return <Info {...props} />;
|
||||||
|
case "error.ftl": return <Error {...props} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
@ -25,8 +25,7 @@ export declare namespace KcContext {
|
|||||||
displayName?: string;
|
displayName?: string;
|
||||||
displayNameHtml?: string;
|
displayNameHtml?: string;
|
||||||
internationalizationEnabled: boolean;
|
internationalizationEnabled: boolean;
|
||||||
password: boolean;
|
registrationEmailAsUsername: boolean; //<---
|
||||||
registrationEmailAsUsername: boolean;
|
|
||||||
};
|
};
|
||||||
/** Undefined if !realm.internationalizationEnabled */
|
/** Undefined if !realm.internationalizationEnabled */
|
||||||
locale?: {
|
locale?: {
|
||||||
@ -63,6 +62,7 @@ export declare namespace KcContext {
|
|||||||
realm: {
|
realm: {
|
||||||
loginWithEmailAllowed: boolean;
|
loginWithEmailAllowed: boolean;
|
||||||
rememberMe: boolean;
|
rememberMe: boolean;
|
||||||
|
password: boolean;
|
||||||
resetPasswordAllowed: boolean;
|
resetPasswordAllowed: boolean;
|
||||||
registrationAllowed: boolean;
|
registrationAllowed: boolean;
|
||||||
};
|
};
|
||||||
@ -132,7 +132,10 @@ export declare namespace KcContext {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type Error = Template & {
|
export type Error = Template & {
|
||||||
pageId: "error.ftl"
|
pageId: "error.ftl";
|
||||||
|
client?: {
|
||||||
|
baseUrl?: string;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user