Allow configuring auth header logo
This commit is contained in:
parent
18d898cc1f
commit
678904dcfb
2 changed files with 10 additions and 3 deletions
|
@ -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. `branding`: Configures various branding and logo details, such as:
|
||||||
1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app
|
1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app
|
||||||
during authentication flows
|
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
|
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
|
server is not Riot and normally not your homeserver either. The integration server settings
|
||||||
may be left blank to disable integrations.
|
may be left blank to disable integrations.
|
||||||
|
|
|
@ -19,8 +19,7 @@ limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
import SdkConfig from 'matrix-react-sdk/lib/SdkConfig';
|
||||||
const LOGO_URI = "themes/riot/img/logos/riot-im-logo-black-text.svg";
|
|
||||||
|
|
||||||
export default class VectorAuthHeaderLogo extends React.PureComponent {
|
export default class VectorAuthHeaderLogo extends React.PureComponent {
|
||||||
static replaces = 'AuthHeaderLogo'
|
static replaces = 'AuthHeaderLogo'
|
||||||
|
@ -30,9 +29,15 @@ export default class VectorAuthHeaderLogo extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
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 (
|
return (
|
||||||
<div className="mx_AuthHeaderLogo">
|
<div className="mx_AuthHeaderLogo">
|
||||||
<img src={LOGO_URI} alt="Riot" />
|
<img src={logoUrl} alt="Riot" />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue