Allow configuring auth header logo

This commit is contained in:
J. Ryan Stinnett 2019-02-11 16:23:22 +00:00
parent 18d898cc1f
commit 678904dcfb
2 changed files with 10 additions and 3 deletions

View file

@ -19,8 +19,7 @@ limitations under the License.
import React from 'react';
import PropTypes from 'prop-types';
const LOGO_URI = "themes/riot/img/logos/riot-im-logo-black-text.svg";
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
export default class VectorAuthHeaderLogo extends React.PureComponent {
static replaces = 'AuthHeaderLogo'
@ -30,9 +29,15 @@ export default class VectorAuthHeaderLogo extends React.PureComponent {
}
render() {
const brandingConfig = SdkConfig.get().branding;
let logoUrl = "themes/riot/img/logos/riot-im-logo-black-text.svg";
if (brandingConfig && brandingConfig.authHeaderLogoUrl) {
logoUrl = brandingConfig.authHeaderLogoUrl;
}
return (
<div className="mx_AuthHeaderLogo">
<img src={LOGO_URI} alt="Riot" />
<img src={logoUrl} alt="Riot" />
</div>
);
}