Skip to content

Commit

Permalink
PR review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Jan de Wit <[email protected]>
  • Loading branch information
edewit committed Oct 28, 2024
1 parent bce1f7c commit 3ff9b71
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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?
darkModeEnabled=Dark mode enabled?
darkModeEnabledHelp=When your theme is using PatternFly you can use this option to turn dark mode off
1 change: 1 addition & 0 deletions js/apps/admin-ui/src/realm-settings/ThemesTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export const RealmSettingsThemesTab = ({
<FormProvider {...form}>
<DefaultSwitchControl
name="attributes.darkMode"
labelIcon={t("darkModeEnabledHelp")}
label={t("darkModeEnabled")}
defaultValue="true"
stringify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private static Map<String, Object> 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)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<meta name="color-scheme" content="light${(darkMode)?then(' dark', '')}">
<meta name="color-scheme" content="light${darkMode?then(' dark', '')}">

<#if properties.meta?has_content>
<#list properties.meta?split(' ') as meta>
Expand Down

0 comments on commit 3ff9b71

Please sign in to comment.