Compare commits
12 Commits
v8.0.0-rc.
...
v8.1.0
Author | SHA1 | Date | |
---|---|---|---|
a722582709 | |||
de64deb5c5 | |||
402c6fc64a | |||
a1f934466c | |||
15aa114579 | |||
b9cc82e37d | |||
8af9c8b150 | |||
7dcc985222 | |||
9c2bc19897 | |||
801b08359a | |||
c469dee158 | |||
2aa7eda1e9 |
17
README.md
17
README.md
@ -47,7 +47,9 @@
|
|||||||
|
|
||||||
> 📣 🛑 Account themes generated by Keycloakify are not currently compatible with Keycloak 22.
|
> 📣 🛑 Account themes generated by Keycloakify are not currently compatible with Keycloak 22.
|
||||||
> We are working on a solution. [Follow progress](https://github.com/keycloakify/keycloakify/issues/389).
|
> We are working on a solution. [Follow progress](https://github.com/keycloakify/keycloakify/issues/389).
|
||||||
> Login and email themes are not affected.
|
> Login and email themes are not affected.
|
||||||
|
> UPDATE: [The PR](https://github.com/keycloak/keycloak/pull/22317) that should future proof Keycloakify account themes has been greenlighted
|
||||||
|
> by the Keycloak team. Resolution is only a matter of time.
|
||||||
|
|
||||||
Keycloakify is fully compatible with Keycloak, starting from version 11 and is anticipated to maintain compatibility with all future versions.
|
Keycloakify is fully compatible with Keycloak, starting from version 11 and is anticipated to maintain compatibility with all future versions.
|
||||||
You can update your Keycloak, your Keycloakify generated theme won't break.
|
You can update your Keycloak, your Keycloakify generated theme won't break.
|
||||||
@ -125,11 +127,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
|
|
||||||
# Changelog highlights
|
# Changelog highlights
|
||||||
|
|
||||||
## 5.0 (candidate)
|
## 8.0
|
||||||
|
|
||||||
- Much smaller .jar size. 70.2 MB -> 7.8 MB.
|
- Much smaller .jar size. 70.2 MB -> 7.8 MB.
|
||||||
Keycloakify now detects which of the static resources from the default theme are actually used by your theme and only include those in the .jar.
|
Keycloakify now detects which of the static resources from the default theme are actually used by your theme and only include those in the .jar.
|
||||||
- Build time: The first build is slowed but the subsequent build are faster. Update your CI so that nodes_modules/.cache is not deleted between builds.
|
- Build time: The first build is slowed but the subsequent build are faster. [Update your CI so that the cache is persisted across CI build](https://github.com/keycloakify/keycloakify-starter/commit/bc378d5afb67e796f520afbc348185f3e319d9d0).
|
||||||
|
|
||||||
### Breaking changes
|
### Breaking changes
|
||||||
|
|
||||||
@ -138,11 +140,15 @@ There are very few breaking changes in this major version.
|
|||||||
- The [`--external-assets` build option has been removed](https://docs.keycloakify.dev/v/v7/build-options#external-assets-deprecated) it was a performance optimization that is no longer relevant now that
|
- The [`--external-assets` build option has been removed](https://docs.keycloakify.dev/v/v7/build-options#external-assets-deprecated) it was a performance optimization that is no longer relevant now that
|
||||||
we have lazy loading.
|
we have lazy loading.
|
||||||
|
|
||||||
|
- `kcContext.usernameEditDisabled` is now `kcContext.usernameHidden`, the type was lying, it has been updated to reflect what's actually on the `kcContext` at runtime.
|
||||||
|
If you want to see in detail what should be updated [see issue](https://github.com/keycloakify/keycloakify/pull/399), or you can search and replace `usernameEditDisabled` -> `usernameHidden` it'll do the trick.
|
||||||
|
|
||||||
- The `usePrepareTemplate` prototype has been changed, you can search and replace:
|
- The `usePrepareTemplate` prototype has been changed, you can search and replace:
|
||||||
|
|
||||||
`src/keycloak-theme/login/Template.tsx`
|
`src/keycloak-theme/login/Template.tsx`
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
url,
|
||||||
"stylesCommon": [
|
"stylesCommon": [
|
||||||
"node_modules/patternfly/dist/css/patternfly.min.css",
|
"node_modules/patternfly/dist/css/patternfly.min.css",
|
||||||
"node_modules/patternfly/dist/css/patternfly-additions.min.css",
|
"node_modules/patternfly/dist/css/patternfly-additions.min.css",
|
||||||
@ -167,6 +173,7 @@ and
|
|||||||
`src/keycloak-theme/account/Template.css`
|
`src/keycloak-theme/account/Template.css`
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
url,
|
||||||
"stylesCommon": ["node_modules/patternfly/dist/css/patternfly.min.css", "node_modules/patternfly/dist/css/patternfly-additions.min.css"],
|
"stylesCommon": ["node_modules/patternfly/dist/css/patternfly.min.css", "node_modules/patternfly/dist/css/patternfly-additions.min.css"],
|
||||||
"styles": ["css/account.css"],
|
"styles": ["css/account.css"],
|
||||||
```
|
```
|
||||||
@ -186,10 +193,10 @@ by
|
|||||||
- The i18n messages you defines in your theme are now also maid available to Keycloak.
|
- The i18n messages you defines in your theme are now also maid available to Keycloak.
|
||||||
In practice this mean that you can now customize the `kcContext.message.summary` that
|
In practice this mean that you can now customize the `kcContext.message.summary` that
|
||||||
display a general alert and the values returned by `kcContext.messagesPerField.get()` that
|
display a general alert and the values returned by `kcContext.messagesPerField.get()` that
|
||||||
are used to display specific error on some field of the form.
|
are used to display specific error on some field of the form.
|
||||||
[See video](https://youtu.be/D6tZcemReTI)
|
[See video](https://youtu.be/D6tZcemReTI)
|
||||||
|
|
||||||
## 7.14
|
## 7.14
|
||||||
|
|
||||||
- Deprecate the `extraPages` build option. Keycloakify is now able to analyze your code to detect extra pages.
|
- Deprecate the `extraPages` build option. Keycloakify is now able to analyze your code to detect extra pages.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "keycloakify",
|
"name": "keycloakify",
|
||||||
"version": "8.0.0-rc.0",
|
"version": "8.1.0",
|
||||||
"description": "Create Keycloak themes using React",
|
"description": "Create Keycloak themes using React",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -22,7 +22,7 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
|
|||||||
`${url.resourcesCommonPath}/node_modules/patternfly/dist/css/patternfly-additions.min.css`,
|
`${url.resourcesCommonPath}/node_modules/patternfly/dist/css/patternfly-additions.min.css`,
|
||||||
`${url.resourcesPath}/css/account.css`
|
`${url.resourcesPath}/css/account.css`
|
||||||
],
|
],
|
||||||
"htmlClassName": undefined,
|
"htmlClassName": getClassName("kcHtmlClass"),
|
||||||
"bodyClassName": clsx("admin-console", "user", getClassName("kcBodyClass"))
|
"bodyClassName": clsx("admin-console", "user", getClassName("kcBodyClass"))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@ export type TemplateProps<KcContext extends KcContext.Common, I18nExtended exten
|
|||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ClassKey = "kcBodyClass" | "kcButtonClass" | "kcButtonPrimaryClass" | "kcButtonLargeClass" | "kcButtonDefaultClass";
|
export type ClassKey = "kcHtmlClass" | "kcBodyClass" | "kcButtonClass" | "kcButtonPrimaryClass" | "kcButtonLargeClass" | "kcButtonDefaultClass";
|
||||||
|
@ -3,6 +3,7 @@ import type { ClassKey } from "keycloakify/account/TemplateProps";
|
|||||||
|
|
||||||
export const { useGetClassName } = createUseClassName<ClassKey>({
|
export const { useGetClassName } = createUseClassName<ClassKey>({
|
||||||
"defaultClasses": {
|
"defaultClasses": {
|
||||||
|
"kcHtmlClass": undefined,
|
||||||
"kcBodyClass": undefined,
|
"kcBodyClass": undefined,
|
||||||
"kcButtonClass": "btn",
|
"kcButtonClass": "btn",
|
||||||
"kcButtonPrimaryClass": "btn-primary",
|
"kcButtonPrimaryClass": "btn-primary",
|
||||||
|
@ -10,8 +10,6 @@ import * as fs from "fs";
|
|||||||
export async function downloadBuiltinKeycloakTheme(params: { projectDirPath: string; keycloakVersion: string; destDirPath: string }) {
|
export async function downloadBuiltinKeycloakTheme(params: { projectDirPath: string; keycloakVersion: string; destDirPath: string }) {
|
||||||
const { projectDirPath, keycloakVersion, destDirPath } = params;
|
const { projectDirPath, keycloakVersion, destDirPath } = params;
|
||||||
|
|
||||||
const start = Date.now();
|
|
||||||
|
|
||||||
await downloadAndUnzip({
|
await downloadAndUnzip({
|
||||||
"doUseCache": true,
|
"doUseCache": true,
|
||||||
projectDirPath,
|
projectDirPath,
|
||||||
@ -72,8 +70,6 @@ export async function downloadBuiltinKeycloakTheme(params: { projectDirPath: str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log("Downloaded Keycloak theme in", Date.now() - start, "ms");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
@ -484,16 +484,15 @@
|
|||||||
<#continue>
|
<#continue>
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#if key == "attemptedUsername" && are_same_path(path, ["auth"])>
|
<#if pageId == "register.ftl" && key == "attemptedUsername" && are_same_path(path, ["auth"])>
|
||||||
|
|
||||||
<#attempt>
|
<#attempt>
|
||||||
<#-- https://github.com/keycloak/keycloak/blob/3a2bf0c04bcde185e497aaa32d0bb7ab7520cf4a/themes/src/main/resources/theme/base/login/template.ftl#L63 -->
|
<#-- https://github.com/keycloak/keycloak/blob/3a2bf0c04bcde185e497aaa32d0bb7ab7520cf4a/themes/src/main/resources/theme/base/login/template.ftl#L63 -->
|
||||||
|
<#-- https://github.com/keycloakify/keycloakify/discussions/406 -->
|
||||||
<#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())>
|
<#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())>
|
||||||
<#continue>
|
<#continue>
|
||||||
</#if>
|
</#if>
|
||||||
<#recover>
|
<#recover>
|
||||||
</#attempt>
|
</#attempt>
|
||||||
|
|
||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<#attempt>
|
<#attempt>
|
||||||
|
@ -17,7 +17,7 @@ export async function promptKeycloakVersion() {
|
|||||||
return { getLatestsSemVersionedTag };
|
return { getLatestsSemVersionedTag };
|
||||||
})();
|
})();
|
||||||
|
|
||||||
console.log("Initialize the directory with email template from which keycloak version?");
|
console.log("Select Keycloak version?");
|
||||||
|
|
||||||
const tags = [
|
const tags = [
|
||||||
...(await getLatestsSemVersionedTag({
|
...(await getLatestsSemVersionedTag({
|
||||||
|
@ -38,7 +38,7 @@ export default function Template(props: TemplateProps<KcContext, I18n>) {
|
|||||||
`${url.resourcesPath}/css/login.css`
|
`${url.resourcesPath}/css/login.css`
|
||||||
],
|
],
|
||||||
"htmlClassName": getClassName("kcHtmlClass"),
|
"htmlClassName": getClassName("kcHtmlClass"),
|
||||||
"bodyClassName": undefined
|
"bodyClassName": getClassName("kcBodyClass")
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isReady) {
|
if (!isReady) {
|
||||||
|
@ -21,6 +21,7 @@ export type TemplateProps<KcContext extends KcContext.Common, I18nExtended exten
|
|||||||
};
|
};
|
||||||
|
|
||||||
export type ClassKey =
|
export type ClassKey =
|
||||||
|
| "kcBodyClass"
|
||||||
| "kcHtmlClass"
|
| "kcHtmlClass"
|
||||||
| "kcLoginClass"
|
| "kcLoginClass"
|
||||||
| "kcHeaderClass"
|
| "kcHeaderClass"
|
||||||
|
@ -3,6 +3,7 @@ import type { ClassKey } from "keycloakify/login/TemplateProps";
|
|||||||
|
|
||||||
export const { useGetClassName } = createUseClassName<ClassKey>({
|
export const { useGetClassName } = createUseClassName<ClassKey>({
|
||||||
"defaultClasses": {
|
"defaultClasses": {
|
||||||
|
"kcBodyClass": undefined,
|
||||||
"kcHtmlClass": "login-pf",
|
"kcHtmlClass": "login-pf",
|
||||||
"kcLoginClass": "login-pf-page",
|
"kcLoginClass": "login-pf-page",
|
||||||
"kcContentWrapperClass": "row",
|
"kcContentWrapperClass": "row",
|
||||||
|
Reference in New Issue
Block a user