From 19ef0a608b0dbf878bbace2cb38e2de878aeb8c8 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 31 Oct 2024 11:19:03 +0100 Subject: [PATCH] Add switch to toggle dark mode (#33822) Closes #33821 Signed-off-by: Erik Jan de Wit Signed-off-by: Jon Koops Co-authored-by: Jon Koops --- .../release_notes/topics/26_1_0.adoc | 2 + .../theme/keycloak.v3/account/index.ftl | 4 +- .../realm_settings/RealmSettingsPage.ts | 8 +- .../theme/keycloak.v2/admin/index.ftl | 4 +- .../admin/messages/messages_en.properties | 2 + .../admin-ui/src/realm-settings/ThemesTab.tsx | 244 +++++------------- .../select-control/SingleSelectControl.tsx | 2 +- .../FreeMarkerLoginFormsProvider.java | 5 +- .../services/error/KeycloakErrorHandler.java | 7 +- .../resources/account/AccountConsole.java | 2 + .../resources/admin/AdminConsole.java | 2 + .../theme/keycloak.v2/login/template.ftl | 4 +- 12 files changed, 93 insertions(+), 193 deletions(-) diff --git a/docs/documentation/release_notes/topics/26_1_0.adoc b/docs/documentation/release_notes/topics/26_1_0.adoc index 1cb30d5645..5a78be4f20 100644 --- a/docs/documentation/release_notes/topics/26_1_0.adoc +++ b/docs/documentation/release_notes/topics/26_1_0.adoc @@ -9,6 +9,8 @@ If you are using a custom theme that extends any of the `keycloak` themes and ar darkMode=false ---- +Alternatively, you can disable dark mode support for the built-in Keycloak themes on a per-realm basis by turning off the "Dark mode" setting under the "Theme" tab in the realm settings. + = LDAP users are created as enabled by default when using Microsoft Active Directory If you are using Microsoft AD and creating users through the administrative interfaces, the user will created as enabled by default. diff --git a/js/apps/account-ui/maven-resources/theme/keycloak.v3/account/index.ftl b/js/apps/account-ui/maven-resources/theme/keycloak.v3/account/index.ftl index ea568b9116..eeef712769 100644 --- a/js/apps/account-ui/maven-resources/theme/keycloak.v3/account/index.ftl +++ b/js/apps/account-ui/maven-resources/theme/keycloak.v3/account/index.ftl @@ -5,7 +5,7 @@ - + ${properties.title!'Account Management'}