From 3ff9b715a4681ab2eca9484a3ddfe279b943abcd Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 22 Oct 2024 14:06:34 +0200 Subject: [PATCH] PR review comments Signed-off-by: Erik Jan de Wit --- .../theme/keycloak.v2/admin/messages/messages_en.properties | 3 ++- js/apps/admin-ui/src/realm-settings/ThemesTab.tsx | 1 + .../java/org/keycloak/services/error/KeycloakErrorHandler.java | 1 + themes/src/main/resources/theme/keycloak.v2/login/template.ftl | 2 +- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties index edc5fe65047d..178ec357a077 100644 --- a/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties +++ b/js/apps/admin-ui/maven-resources/theme/keycloak.v2/admin/messages/messages_en.properties @@ -3273,4 +3273,5 @@ groupDuplicated=Group duplicated duplicateAGroup=Duplicate group couldNotFetchClientRoleMappings=Could not fetch client role mappings\: {{error}} duplicateGroupWarning=Duplication of groups with a large number of subgroups is not supported. Please ensure that the group you are duplicating does not have a large number of subgroups. -darkModeEnabled=Dark mode enabled? \ No newline at end of file +darkModeEnabled=Dark mode enabled? +darkModeEnabledHelp=When your theme is using PatternFly you can use this option to turn dark mode off \ No newline at end of file diff --git a/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx b/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx index e72bf70d061b..5e79c35de689 100644 --- a/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx +++ b/js/apps/admin-ui/src/realm-settings/ThemesTab.tsx @@ -45,6 +45,7 @@ export const RealmSettingsThemesTab = ({ initAttributes(KeycloakSession session, Realm String errorMessage = messagesBundle.getProperty(errorKey); attributes.put("message", new MessageBean(errorMessage, MessageType.ERROR)); + attributes.put("darkMode", true); try { attributes.put("msg", new MessageFormatterMethod(locale, theme.getMessages(locale))); diff --git a/themes/src/main/resources/theme/keycloak.v2/login/template.ftl b/themes/src/main/resources/theme/keycloak.v2/login/template.ftl index 8e10a821c121..28a8437ba684 100644 --- a/themes/src/main/resources/theme/keycloak.v2/login/template.ftl +++ b/themes/src/main/resources/theme/keycloak.v2/login/template.ftl @@ -29,7 +29,7 @@ - + <#if properties.meta?has_content> <#list properties.meta?split(' ') as meta>