From 678904dcfbdaec12913ee8ab31ebd2cfe962163f Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 11 Feb 2019 16:23:22 +0000 Subject: [PATCH] Allow configuring auth header logo --- README.md | 2 ++ src/components/views/auth/VectorAuthHeaderLogo.js | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a7621aa6..b6451f82 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,8 @@ For a good example, see https://riot.im/develop/config.json 1. `branding`: Configures various branding and logo details, such as: 1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app during authentication flows + 1. `authHeaderLogoUrl`: An logo image that is shown in the header during + authentication flows 1. `integrations_ui_url`: URL to the web interface for the integrations server. The integrations server is not Riot and normally not your homeserver either. The integration server settings may be left blank to disable integrations. diff --git a/src/components/views/auth/VectorAuthHeaderLogo.js b/src/components/views/auth/VectorAuthHeaderLogo.js index 38d10044..0161fc3f 100644 --- a/src/components/views/auth/VectorAuthHeaderLogo.js +++ b/src/components/views/auth/VectorAuthHeaderLogo.js @@ -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 (
- Riot + Riot
); }