Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"resourceUrl": "${resourceUrl}",
"logo": "${properties.logo!""}",
"logoUrl": "${properties.logoUrl!""}",
"darkMode": ${darkMode?c},
"baseUrl": "${baseUrl}",
"locale": "${locale}",
"referrerName": "${referrerName!""}",
Expand Down
2 changes: 1 addition & 1 deletion js/apps/account-ui/src/account-security/SigningIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const SigningIn = () => {
>
<div className="pf-v5-c-icon pf-m-xl">
<picture>
{iconDarkSrc && (
{context.environment.darkMode && iconDarkSrc && (
<source
srcSet={iconDarkSrc}
media="(prefers-color-scheme: dark)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"resourceUrl": "${resourceUrl}",
"logo": "${properties.logo!""}",
"logoUrl": "${properties.logoUrl!""}",
"darkMode": ${darkMode?c},
"consoleBaseUrl": "${consoleBaseUrl}",
"masterRealm": "${masterRealm}",
"resourceVersion": "${resourceVersion}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"resourceUrl": "${resourceUrl}",
"logo": "${properties.logo!""}",
"logoUrl": "${properties.logoUrl!""}",
"darkMode": ${darkMode?c},
"baseUrl": "${baseUrl}",
"locale": "${locale}",
"referrerName": "${referrerName!""}",
Expand Down
2 changes: 2 additions & 0 deletions js/libs/ui-shared/src/context/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export type BaseEnvironment = {
logo: string;
/** The URL to be followed when the logo is clicked. */
logoUrl: string;
/** Whether dark mode is enabled for the realm. */
darkMode: boolean;
/** The scopes to be requested when sending authorization requests*/
scope?: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<div class="${properties.kcWebAuthnDefaultIcon!}">
<#if authenticator.iconLight?? || authenticator.iconDark??>
<picture>
<#if authenticator.iconDark??>
<#if darkMode && authenticator.iconDark??>
<source srcset="${url.resourcesPath}/img/passkeys/${authenticator.iconDark}" media="(prefers-color-scheme: dark)">
</#if>
<img src="${url.resourcesPath}/img/passkeys/${authenticator.iconLight!authenticator.iconDark!''}" alt="" width="40" height="40">
Expand Down
Loading