Respect configured auth_header_logo_url for default Welcome page (#10870)
parent
2767fd623a
commit
6f58dd49e3
|
@ -38,7 +38,19 @@ export default class Welcome extends React.PureComponent<IProps> {
|
||||||
if (pagesConfig) {
|
if (pagesConfig) {
|
||||||
pageUrl = pagesConfig.get("welcome_url");
|
pageUrl = pagesConfig.get("welcome_url");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const replaceMap: Record<string, string> = {
|
||||||
|
"$riot:ssoUrl": "#/start_sso",
|
||||||
|
"$riot:casUrl": "#/start_cas",
|
||||||
|
"$matrixLogo": MATRIX_LOGO_HTML,
|
||||||
|
"[matrix]": MATRIX_LOGO_HTML,
|
||||||
|
};
|
||||||
|
|
||||||
if (!pageUrl) {
|
if (!pageUrl) {
|
||||||
|
// Fall back to default and replace $logoUrl in welcome.html
|
||||||
|
const brandingConfig = SdkConfig.getObject("branding");
|
||||||
|
const logoUrl = brandingConfig?.get("auth_header_logo_url") ?? "themes/element/img/logos/element-logo.svg";
|
||||||
|
replaceMap["$logoUrl"] = logoUrl;
|
||||||
pageUrl = "welcome.html";
|
pageUrl = "welcome.html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,16 +61,7 @@ export default class Welcome extends React.PureComponent<IProps> {
|
||||||
mx_WelcomePage_registrationDisabled: !SettingsStore.getValue(UIFeature.Registration),
|
mx_WelcomePage_registrationDisabled: !SettingsStore.getValue(UIFeature.Registration),
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<EmbeddedPage
|
<EmbeddedPage className="mx_WelcomePage" url={pageUrl} replaceMap={replaceMap} />
|
||||||
className="mx_WelcomePage"
|
|
||||||
url={pageUrl}
|
|
||||||
replaceMap={{
|
|
||||||
"$riot:ssoUrl": "#/start_sso",
|
|
||||||
"$riot:casUrl": "#/start_cas",
|
|
||||||
"$matrixLogo": MATRIX_LOGO_HTML,
|
|
||||||
"[matrix]": MATRIX_LOGO_HTML,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<LanguageSelector />
|
<LanguageSelector />
|
||||||
</div>
|
</div>
|
||||||
</AuthPage>
|
</AuthPage>
|
||||||
|
|
Loading…
Reference in New Issue