Compare commits

..

6 Commits

4 changed files with 20 additions and 8 deletions

@ -125,7 +125,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
# Changelog highlights # Changelog highlights
## 5.0 (candidate) ## 8.0 (candidate)
- 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.
@ -138,11 +138,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 +171,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 +191,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.1", "version": "8.0.0-rc.3",
"description": "Create Keycloak themes using React", "description": "Create Keycloak themes using React",
"repository": { "repository": {
"type": "git", "type": "git",

@ -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() {

@ -483,6 +483,17 @@
<#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]> <#local out_seq += ["/*If you need '" + key + "' on " + pageId + ", please submit an issue to the Keycloakify repo*/"]>
<#continue> <#continue>
</#if> </#if>
<#if pageId == "register.ftl" && key == "attemptedUsername" && are_same_path(path, ["auth"])>
<#attempt>
<#-- 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())>
<#continue>
</#if>
<#recover>
</#attempt>
</#if>
<#attempt> <#attempt>
<#if !object[key]??> <#if !object[key]??>