From 40b0c94dbd7e4d2861842955ad9c632539d16bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Barto=C5=A1?= Date: Thu, 23 Jul 2026 15:42:35 +0200 Subject: [PATCH] Passkey icons use wrong color variant when realm disables dark mode (#51091) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #51087 Signed-off-by: Martin Bartoš (cherry picked from commit c50bfbdd2a01654bb28ec7e17a16a9e3e77c173a) --- .../maven-resources/theme/keycloak.v3/account/index.ftl | 1 + js/apps/account-ui/src/account-security/SigningIn.tsx | 2 +- .../admin-ui/maven-resources/theme/keycloak.v2/admin/index.ftl | 1 + .../maven-resources/theme/my-account/account/index.ftl.mu | 1 + js/libs/ui-shared/src/context/environment.ts | 2 ++ .../resources/theme/keycloak.v2/login/webauthn-authenticate.ftl | 2 +- 6 files changed, 7 insertions(+), 2 deletions(-) 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 225349a1cd0d..af6b1d7f43a9 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 @@ -155,6 +155,7 @@ "resourceUrl": "${resourceUrl}", "logo": "${properties.logo!""}", "logoUrl": "${properties.logoUrl!""}", + "darkMode": ${darkMode?c}, "baseUrl": "${baseUrl}", "locale": "${locale}", "referrerName": "${referrerName!""}", diff --git a/js/apps/account-ui/src/account-security/SigningIn.tsx b/js/apps/account-ui/src/account-security/SigningIn.tsx index 8ff4281824f4..a1325a37a1ef 100644 --- a/js/apps/account-ui/src/account-security/SigningIn.tsx +++ b/js/apps/account-ui/src/account-security/SigningIn.tsx @@ -130,7 +130,7 @@ export const SigningIn = () => { >
- {iconDarkSrc && ( + {context.environment.darkMode && iconDarkSrc && ( <#if authenticator.iconLight?? || authenticator.iconDark??> - <#if authenticator.iconDark??> + <#if darkMode && authenticator.iconDark??>