#177: Provide a simple way to disable fetching of default resources
This commit is contained in:
@ -4,15 +4,20 @@ import type { KcProps } from "./KcProps";
|
|||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const Error = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Error; i18n: I18n } & KcProps) => {
|
const Error = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.Error; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { message, client } = kcContext;
|
const { message, client } = kcContext;
|
||||||
|
|
||||||
const { msg } = i18n;
|
const { msg } = i18n;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={msg("errorTitle")}
|
headerNode={msg("errorTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
@ -29,6 +34,7 @@ const Error = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Er
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default Error;
|
export default Error;
|
||||||
|
@ -6,7 +6,13 @@ import { useCssAndCx } from "../tools/useCssAndCx";
|
|||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||||
|
|
||||||
const IdpReviewUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.IdpReviewUserProfile; i18n: I18n } & KcProps) => {
|
const IdpReviewUserProfile = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.IdpReviewUserProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -17,8 +23,7 @@ const IdpReviewUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: K
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("loginIdpReviewProfileTitle")}
|
headerNode={msg("loginIdpReviewProfileTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-idp-review-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
<form id="kc-idp-review-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
||||||
@ -30,7 +35,12 @@ const IdpReviewUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: K
|
|||||||
</div>
|
</div>
|
||||||
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
||||||
<input
|
<input
|
||||||
className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)}
|
className={cx(
|
||||||
|
props.kcButtonClass,
|
||||||
|
props.kcButtonPrimaryClass,
|
||||||
|
props.kcButtonBlockClass,
|
||||||
|
props.kcButtonLargeClass
|
||||||
|
)}
|
||||||
type="submit"
|
type="submit"
|
||||||
value={msgStr("doSubmit")}
|
value={msgStr("doSubmit")}
|
||||||
disabled={!isFomSubmittable}
|
disabled={!isFomSubmittable}
|
||||||
@ -41,6 +51,7 @@ const IdpReviewUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: K
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default IdpReviewUserProfile;
|
export default IdpReviewUserProfile;
|
||||||
|
@ -5,7 +5,13 @@ import { assert } from "../tools/assert";
|
|||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const Info = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Info; i18n: I18n } & KcProps) => {
|
const Info = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.Info; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { msgStr, msg } = i18n;
|
const { msgStr, msg } = i18n;
|
||||||
|
|
||||||
assert(kcContext.message !== undefined);
|
assert(kcContext.message !== undefined);
|
||||||
@ -14,8 +20,7 @@ const Info = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Inf
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={messageHeader !== undefined ? <>{messageHeader}</> : <>{message.summary}</>}
|
headerNode={messageHeader !== undefined ? <>{messageHeader}</> : <>{message.summary}</>}
|
||||||
formNode={
|
formNode={
|
||||||
@ -46,6 +51,7 @@ const Info = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Inf
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default Info;
|
export default Info;
|
||||||
|
@ -23,7 +23,12 @@ const LogoutConfirm = lazy(() => import("./LogoutConfirm"));
|
|||||||
const UpdateUserProfile = lazy(() => import("./UpdateUserProfile"));
|
const UpdateUserProfile = lazy(() => import("./UpdateUserProfile"));
|
||||||
const IdpReviewUserProfile = lazy(() => import("./IdpReviewUserProfile"));
|
const IdpReviewUserProfile = lazy(() => import("./IdpReviewUserProfile"));
|
||||||
|
|
||||||
const KcApp = memo(({ kcContext, i18n: userProvidedI18n, ...kcProps }: { kcContext: KcContextBase; i18n?: I18n } & KcProps) => {
|
const KcApp = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n: userProvidedI18n,
|
||||||
|
...kcProps
|
||||||
|
}: { kcContext: KcContextBase; i18n?: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const i18n = (function useClosure() {
|
const i18n = (function useClosure() {
|
||||||
const i18n = useI18n({
|
const i18n = useI18n({
|
||||||
kcContext,
|
kcContext,
|
||||||
@ -84,6 +89,7 @@ const KcApp = memo(({ kcContext, i18n: userProvidedI18n, ...kcProps }: { kcConte
|
|||||||
})()}
|
})()}
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default KcApp;
|
export default KcApp;
|
||||||
|
@ -7,7 +7,13 @@ import { useConstCallback } from "powerhooks/useConstCallback";
|
|||||||
import type { FormEventHandler } from "react";
|
import type { FormEventHandler } from "react";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const Login = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Login; i18n: I18n } & KcProps) => {
|
const Login = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.Login; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { social, realm, url, usernameEditDisabled, login, auth, registrationDisabled } = kcContext;
|
const { social, realm, url, usernameEditDisabled, login, auth, registrationDisabled } = kcContext;
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -32,8 +38,7 @@ const Login = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Lo
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayInfo={social.displayInfo}
|
displayInfo={social.displayInfo}
|
||||||
displayWide={realm.password && social.providers !== undefined}
|
displayWide={realm.password && social.providers !== undefined}
|
||||||
headerNode={msg("doLogIn")}
|
headerNode={msg("doLogIn")}
|
||||||
@ -41,7 +46,9 @@ const Login = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Lo
|
|||||||
<div id="kc-form" className={cx(realm.password && social.providers !== undefined && props.kcContentWrapperClass)}>
|
<div id="kc-form" className={cx(realm.password && social.providers !== undefined && props.kcContentWrapperClass)}>
|
||||||
<div
|
<div
|
||||||
id="kc-form-wrapper"
|
id="kc-form-wrapper"
|
||||||
className={cx(realm.password && social.providers && [props.kcFormSocialAccountContentClass, props.kcFormSocialAccountClass])}
|
className={cx(
|
||||||
|
realm.password && social.providers && [props.kcFormSocialAccountContentClass, props.kcFormSocialAccountClass]
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{realm.password && (
|
{realm.password && (
|
||||||
<form id="kc-form-login" onSubmit={onSubmit} action={url.loginAction} method="post">
|
<form id="kc-form-login" onSubmit={onSubmit} action={url.loginAction} method="post">
|
||||||
@ -190,6 +197,7 @@ const Login = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Lo
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default Login;
|
export default Login;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcContextBase } from "../getKcContext/KcContextBase";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginConfigTotp = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginConfigTotp; i18n: I18n } & KcProps) => {
|
const LoginConfigTotp = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginConfigTotp; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, isAppInitiatedAction, totp, mode, messagesPerField } = kcContext;
|
const { url, isAppInitiatedAction, totp, mode, messagesPerField } = kcContext;
|
||||||
|
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
@ -20,8 +26,7 @@ const LoginConfigTotp = memo(({ kcContext, i18n, ...props }: { kcContext: KcCont
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("loginTotpTitle")}
|
headerNode={msg("loginTotpTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<>
|
<>
|
||||||
@ -181,6 +186,7 @@ const LoginConfigTotp = memo(({ kcContext, i18n, ...props }: { kcContext: KcCont
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginConfigTotp;
|
export default LoginConfigTotp;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcContextBase } from "../getKcContext/KcContextBase";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginIdpLinkConfirm = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginIdpLinkConfirm; i18n: I18n } & KcProps) => {
|
const LoginIdpLinkConfirm = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginIdpLinkConfirm; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, idpAlias } = kcContext;
|
const { url, idpAlias } = kcContext;
|
||||||
|
|
||||||
const { msg } = i18n;
|
const { msg } = i18n;
|
||||||
@ -14,8 +20,7 @@ const LoginIdpLinkConfirm = memo(({ kcContext, i18n, ...props }: { kcContext: Kc
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("confirmLinkIdpTitle")}
|
headerNode={msg("confirmLinkIdpTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-register-form" action={url.loginAction} method="post">
|
<form id="kc-register-form" action={url.loginAction} method="post">
|
||||||
@ -43,6 +48,7 @@ const LoginIdpLinkConfirm = memo(({ kcContext, i18n, ...props }: { kcContext: Kc
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginIdpLinkConfirm;
|
export default LoginIdpLinkConfirm;
|
||||||
|
@ -4,15 +4,20 @@ import type { KcProps } from "./KcProps";
|
|||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginIdpLinkEmail = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginIdpLinkEmail; i18n: I18n } & KcProps) => {
|
const LoginIdpLinkEmail = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginIdpLinkEmail; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, realm, brokerContext, idpAlias } = kcContext;
|
const { url, realm, brokerContext, idpAlias } = kcContext;
|
||||||
|
|
||||||
const { msg } = i18n;
|
const { msg } = i18n;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("emailLinkIdpTitle", idpAlias)}
|
headerNode={msg("emailLinkIdpTitle", idpAlias)}
|
||||||
formNode={
|
formNode={
|
||||||
<>
|
<>
|
||||||
@ -29,6 +34,7 @@ const LoginIdpLinkEmail = memo(({ kcContext, i18n, ...props }: { kcContext: KcCo
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginIdpLinkEmail;
|
export default LoginIdpLinkEmail;
|
||||||
|
@ -7,7 +7,13 @@ import { pathJoin } from "../../bin/tools/pathJoin";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginOtp = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginOtp; i18n: I18n } & KcProps) => {
|
const LoginOtp = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginOtp; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { otpLogin, url } = kcContext;
|
const { otpLogin, url } = kcContext;
|
||||||
|
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
@ -33,8 +39,7 @@ const LoginOtp = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("doLogIn")}
|
headerNode={msg("doLogIn")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-otp-login-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
<form id="kc-otp-login-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
||||||
@ -72,7 +77,12 @@ const LoginOtp = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase
|
|||||||
|
|
||||||
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
||||||
<input
|
<input
|
||||||
className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)}
|
className={cx(
|
||||||
|
props.kcButtonClass,
|
||||||
|
props.kcButtonPrimaryClass,
|
||||||
|
props.kcButtonBlockClass,
|
||||||
|
props.kcButtonLargeClass
|
||||||
|
)}
|
||||||
name="login"
|
name="login"
|
||||||
id="kc-login"
|
id="kc-login"
|
||||||
type="submit"
|
type="submit"
|
||||||
@ -84,7 +94,8 @@ const LoginOtp = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
declare const $: any;
|
declare const $: any;
|
||||||
|
|
||||||
|
@ -4,15 +4,20 @@ import type { KcProps } from "./KcProps";
|
|||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginPageExpired = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginPageExpired; i18n: I18n } & KcProps) => {
|
const LoginPageExpired = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginPageExpired; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url } = kcContext;
|
const { url } = kcContext;
|
||||||
|
|
||||||
const { msg } = i18n;
|
const { msg } = i18n;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={msg("pageExpiredTitle")}
|
headerNode={msg("pageExpiredTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
@ -33,6 +38,7 @@ const LoginPageExpired = memo(({ kcContext, i18n, ...props }: { kcContext: KcCon
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginPageExpired;
|
export default LoginPageExpired;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcContextBase } from "../getKcContext/KcContextBase";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginResetPassword = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginResetPassword; i18n: I18n } & KcProps) => {
|
const LoginResetPassword = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginResetPassword; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, realm, auth } = kcContext;
|
const { url, realm, auth } = kcContext;
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -14,8 +20,7 @@ const LoginResetPassword = memo(({ kcContext, i18n, ...props }: { kcContext: KcC
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={msg("emailForgotTitle")}
|
headerNode={msg("emailForgotTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
@ -52,7 +57,12 @@ const LoginResetPassword = memo(({ kcContext, i18n, ...props }: { kcContext: KcC
|
|||||||
|
|
||||||
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
||||||
<input
|
<input
|
||||||
className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)}
|
className={cx(
|
||||||
|
props.kcButtonClass,
|
||||||
|
props.kcButtonPrimaryClass,
|
||||||
|
props.kcButtonBlockClass,
|
||||||
|
props.kcButtonLargeClass
|
||||||
|
)}
|
||||||
type="submit"
|
type="submit"
|
||||||
value={msgStr("doSubmit")}
|
value={msgStr("doSubmit")}
|
||||||
/>
|
/>
|
||||||
@ -63,6 +73,7 @@ const LoginResetPassword = memo(({ kcContext, i18n, ...props }: { kcContext: KcC
|
|||||||
infoNode={msg("emailInstruction")}
|
infoNode={msg("emailInstruction")}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginResetPassword;
|
export default LoginResetPassword;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcContextBase } from "../getKcContext/KcContextBase";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginUpdatePassword = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginUpdatePassword; i18n: I18n } & KcProps) => {
|
const LoginUpdatePassword = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginUpdatePassword; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -14,8 +20,7 @@ const LoginUpdatePassword = memo(({ kcContext, i18n, ...props }: { kcContext: Kc
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("updatePasswordTitle")}
|
headerNode={msg("updatePasswordTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-passwd-update-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
<form id="kc-passwd-update-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
||||||
@ -114,6 +119,7 @@ const LoginUpdatePassword = memo(({ kcContext, i18n, ...props }: { kcContext: Kc
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginUpdatePassword;
|
export default LoginUpdatePassword;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcContextBase } from "../getKcContext/KcContextBase";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginUpdateProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginUpdateProfile; i18n: I18n } & KcProps) => {
|
const LoginUpdateProfile = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginUpdateProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -14,8 +20,7 @@ const LoginUpdateProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcC
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("loginProfileTitle")}
|
headerNode={msg("loginProfileTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
<form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
||||||
@ -73,7 +78,13 @@ const LoginUpdateProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcC
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div className={cx(props.kcInputWrapperClass)}>
|
<div className={cx(props.kcInputWrapperClass)}>
|
||||||
<input type="text" id="lastName" name="lastName" defaultValue={user.lastName ?? ""} className={cx(props.kcInputClass)} />
|
<input
|
||||||
|
type="text"
|
||||||
|
id="lastName"
|
||||||
|
name="lastName"
|
||||||
|
defaultValue={user.lastName ?? ""}
|
||||||
|
className={cx(props.kcInputClass)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -117,6 +128,7 @@ const LoginUpdateProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcC
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginUpdateProfile;
|
export default LoginUpdateProfile;
|
||||||
|
@ -4,15 +4,20 @@ import type { KcProps } from "./KcProps";
|
|||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LoginVerifyEmail = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LoginVerifyEmail; i18n: I18n } & KcProps) => {
|
const LoginVerifyEmail = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LoginVerifyEmail; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { msg } = i18n;
|
const { msg } = i18n;
|
||||||
|
|
||||||
const { url, user } = kcContext;
|
const { url, user } = kcContext;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={msg("emailVerifyTitle")}
|
headerNode={msg("emailVerifyTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
@ -29,6 +34,7 @@ const LoginVerifyEmail = memo(({ kcContext, i18n, ...props }: { kcContext: KcCon
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LoginVerifyEmail;
|
export default LoginVerifyEmail;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcProps } from "./KcProps";
|
|||||||
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
import type { KcContextBase } from "../getKcContext/KcContextBase";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const LogoutConfirm = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.LogoutConfirm; i18n: I18n } & KcProps) => {
|
const LogoutConfirm = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.LogoutConfirm; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, client, logoutConfirm } = kcContext;
|
const { url, client, logoutConfirm } = kcContext;
|
||||||
|
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
@ -14,8 +20,7 @@ const LogoutConfirm = memo(({ kcContext, i18n, ...props }: { kcContext: KcContex
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={msg("logoutConfirmTitle")}
|
headerNode={msg("logoutConfirmTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
@ -57,6 +62,7 @@ const LogoutConfirm = memo(({ kcContext, i18n, ...props }: { kcContext: KcContex
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default LogoutConfirm;
|
export default LogoutConfirm;
|
||||||
|
@ -5,7 +5,13 @@ import type { KcContextBase } from "../getKcContext/KcContextBase";
|
|||||||
import { useCssAndCx } from "../tools/useCssAndCx";
|
import { useCssAndCx } from "../tools/useCssAndCx";
|
||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
|
|
||||||
const Register = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Register; i18n: I18n } & KcProps) => {
|
const Register = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.Register; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, messagesPerField, register, realm, passwordRequired, recaptchaRequired, recaptchaSiteKey } = kcContext;
|
const { url, messagesPerField, register, realm, passwordRequired, recaptchaRequired, recaptchaSiteKey } = kcContext;
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -14,8 +20,7 @@ const Register = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("registerTitle")}
|
headerNode={msg("registerTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-register-form" className={cx(props.kcFormClass)} action={url.registrationAction} method="post">
|
<form id="kc-register-form" className={cx(props.kcFormClass)} action={url.registrationAction} method="post">
|
||||||
@ -143,7 +148,12 @@ const Register = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase
|
|||||||
|
|
||||||
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
||||||
<input
|
<input
|
||||||
className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)}
|
className={cx(
|
||||||
|
props.kcButtonClass,
|
||||||
|
props.kcButtonPrimaryClass,
|
||||||
|
props.kcButtonBlockClass,
|
||||||
|
props.kcButtonLargeClass
|
||||||
|
)}
|
||||||
type="submit"
|
type="submit"
|
||||||
value={msgStr("doRegister")}
|
value={msgStr("doRegister")}
|
||||||
/>
|
/>
|
||||||
@ -153,6 +163,7 @@ const Register = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default Register;
|
export default Register;
|
||||||
|
@ -6,7 +6,13 @@ import { useCssAndCx } from "../tools/useCssAndCx";
|
|||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||||
|
|
||||||
const RegisterUserProfile = memo(({ kcContext, i18n, ...props_ }: { kcContext: KcContextBase.RegisterUserProfile; i18n: I18n } & KcProps) => {
|
const RegisterUserProfile = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props_
|
||||||
|
}: { kcContext: KcContextBase.RegisterUserProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { url, messagesPerField, recaptchaRequired, recaptchaSiteKey } = kcContext;
|
const { url, messagesPerField, recaptchaRequired, recaptchaSiteKey } = kcContext;
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -25,10 +31,9 @@ const RegisterUserProfile = memo(({ kcContext, i18n, ...props_ }: { kcContext: K
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
displayMessage={messagesPerField.exists("global")}
|
displayMessage={messagesPerField.exists("global")}
|
||||||
displayRequiredFields={true}
|
displayRequiredFields={true}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("registerTitle")}
|
headerNode={msg("registerTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-register-form" className={cx(props.kcFormClass)} action={url.registrationAction} method="post">
|
<form id="kc-register-form" className={cx(props.kcFormClass)} action={url.registrationAction} method="post">
|
||||||
@ -51,7 +56,12 @@ const RegisterUserProfile = memo(({ kcContext, i18n, ...props_ }: { kcContext: K
|
|||||||
|
|
||||||
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
<div id="kc-form-buttons" className={cx(props.kcFormButtonsClass)}>
|
||||||
<input
|
<input
|
||||||
className={cx(props.kcButtonClass, props.kcButtonPrimaryClass, props.kcButtonBlockClass, props.kcButtonLargeClass)}
|
className={cx(
|
||||||
|
props.kcButtonClass,
|
||||||
|
props.kcButtonPrimaryClass,
|
||||||
|
props.kcButtonBlockClass,
|
||||||
|
props.kcButtonLargeClass
|
||||||
|
)}
|
||||||
type="submit"
|
type="submit"
|
||||||
value={msgStr("doRegister")}
|
value={msgStr("doRegister")}
|
||||||
disabled={!isFomSubmittable}
|
disabled={!isFomSubmittable}
|
||||||
@ -62,6 +72,7 @@ const RegisterUserProfile = memo(({ kcContext, i18n, ...props_ }: { kcContext: K
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default RegisterUserProfile;
|
export default RegisterUserProfile;
|
||||||
|
@ -54,7 +54,13 @@ export function useDownloadTerms(params: {
|
|||||||
}, []);
|
}, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Terms = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Terms; i18n: I18n } & KcProps) => {
|
const Terms = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.Terms; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
|
|
||||||
useRerenderOnStateChange(evtTermMarkdown);
|
useRerenderOnStateChange(evtTermMarkdown);
|
||||||
@ -69,8 +75,7 @@ const Terms = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Te
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
displayMessage={false}
|
displayMessage={false}
|
||||||
headerNode={msg("termsTitle")}
|
headerNode={msg("termsTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
@ -103,6 +108,7 @@ const Terms = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.Te
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default Terms;
|
export default Terms;
|
||||||
|
@ -6,7 +6,13 @@ import { useCssAndCx } from "../tools/useCssAndCx";
|
|||||||
import type { I18n } from "../i18n";
|
import type { I18n } from "../i18n";
|
||||||
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
import { UserProfileFormFields } from "./shared/UserProfileCommons";
|
||||||
|
|
||||||
const UpdateUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcContextBase.UpdateUserProfile; i18n: I18n } & KcProps) => {
|
const UpdateUserProfile = memo(
|
||||||
|
({
|
||||||
|
kcContext,
|
||||||
|
i18n,
|
||||||
|
doFetchDefaultThemeResources = true,
|
||||||
|
...props
|
||||||
|
}: { kcContext: KcContextBase.UpdateUserProfile; i18n: I18n; doFetchDefaultThemeResources?: boolean } & KcProps) => {
|
||||||
const { cx } = useCssAndCx();
|
const { cx } = useCssAndCx();
|
||||||
|
|
||||||
const { msg, msgStr } = i18n;
|
const { msg, msgStr } = i18n;
|
||||||
@ -17,8 +23,7 @@ const UpdateUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcCo
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Template
|
<Template
|
||||||
{...{ kcContext, i18n, ...props }}
|
{...{ kcContext, i18n, doFetchDefaultThemeResources, ...props }}
|
||||||
doFetchDefaultThemeResources={true}
|
|
||||||
headerNode={msg("loginProfileTitle")}
|
headerNode={msg("loginProfileTitle")}
|
||||||
formNode={
|
formNode={
|
||||||
<form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
<form id="kc-update-profile-form" className={cx(props.kcFormClass)} action={url.loginAction} method="post">
|
||||||
@ -66,6 +71,7 @@ const UpdateUserProfile = memo(({ kcContext, i18n, ...props }: { kcContext: KcCo
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
export default UpdateUserProfile;
|
export default UpdateUserProfile;
|
||||||
|
Reference in New Issue
Block a user